should not corrupt match vars such as $1 and $2
p4raw-id: //depot/perl@25360
$| = 1;
-print "1..1186\n";
+print "1..1187\n";
BEGIN {
chdir 't' if -d 't';
ok($latin1 =~ /(abc|$utf8)/i, "# latin/utf8 trie runtime");
}
-# last test 1186
+# [perl #37038] Global regular matches generate invalid pointers
+
+{
+ my $s = "abcd";
+ $s =~ /(..)(..)/g;
+ $s = $1;
+ $s = $2;
+ ok($s eq 'cd',
+ "# TODO assigning to original string should not corrupt match vars");
+}
+
+# last test 1187
+