#!/usr/bin/perl

use Unicode::GCString;

$SIG{__WARN__} = sub {
    print STDERR @_;
};

warn 'needs to warn first to reproduce?';
print _doit() ? "ok\n" : "not ok\n";

sub _doit {
  "foo" =~ /(.+)/;
  ''.$1 if shift @ARGV; # this makes it go away
  return Unicode::GCString->new($1);
}

