issue46.t 500 B

1234567891011121314151617181920
  1. #! /usr/bin/env perl
  2. # http://code.google.com/p/perl-compiler/issues/detail?id=46
  3. use Test::More tests => 1;
  4. use strict;
  5. BEGIN {
  6. unshift @INC, 't';
  7. require "test.pl";
  8. }
  9. # crashes non-threaded pp_ctl.c:248 cLOGOP->op_first being 0
  10. my $script = <<'EOF';
  11. my $pattern = 'x'; 'foo' =~ /$pattern/o;
  12. print "ok";
  13. EOF
  14. use B::CC;
  15. ctestok(1, "CC", "ccode46i", $script,
  16. (($Config{useithreads} or $B::CC::VERSION >= 1.08)
  17. ? "" : "TODO "). "issue46 m//o cLOGOP->op_first fixed with r610, threaded only");