From: Jakub Jelinek Date: Fri, 10 Jun 2016 19:49:05 +0000 (+0200) Subject: re PR middle-end/71494 (label as value in nested function) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec1c20db05b6553aaa3a7466628071404deb9fea;p=gcc.git re PR middle-end/71494 (label as value in nested function) PR middle-end/71494 * tree-nested.c (convert_nonlocal_reference_stmt): For GIMPLE_GOTO without LABEL_DECL, set *handled_ops_p to false instead of true. * gcc.c-torture/execute/pr71494.c: New test. From-SVN: r237317 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4ce8dbaaaa..0af20baea1f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-06-10 Jakub Jelinek + + PR middle-end/71494 + * tree-nested.c (convert_nonlocal_reference_stmt): For GIMPLE_GOTO + without LABEL_DECL, set *handled_ops_p to false instead of true. + 2016-06-10 Martin Sebor PR c/71392 @@ -12,7 +18,7 @@ (BUILT_IN_UADDL_OVERFLOW, BUILT_IN_UADDLL_OVERFLOW): Same. (BUILT_IN_USUB_OVERFLOW, BUILT_IN_USUBL_OVERFLOW): Same. (BUILT_IN_USUBLL_OVERFLOW, BUILT_IN_UMUL_OVERFLOW): Same. - (BUILT_IN_UMULL_OVERFLOW, BUILT_IN_UMULLL_OVERFLOW): + (BUILT_IN_UMULL_OVERFLOW, BUILT_IN_UMULLL_OVERFLOW): Same. 2016-06-10 Bernd Edlinger @@ -124,7 +130,7 @@ sysroot/usr/lib/32api for additional win32 libraries, fixes failing Cygwin bootstrapping. -2016-06-09 Marcin Baczyński +2016-06-09 Marcin Baczyński * diagnostic.h (diagnostic_line_cutoff, diagnostic_flush_buffer): delete. @@ -834,7 +840,7 @@ only edges out of BB are EH edges. 2016-06-04 Martin Sebor - Marcin Baczyński + Marcin Baczyński PR c/48116 * doc/invoke.texi (-Wreturn-type): Mention not warning on return with diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cf9c24bb40e..c35bcb69d52 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2016-06-10 Jakub Jelinek + PR middle-end/71494 + * gcc.c-torture/execute/pr71494.c: New test. + PR c/68657 * gcc.target/i386/pr68657.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/pr71494.c b/gcc/testsuite/gcc.c-torture/execute/pr71494.c new file mode 100644 index 00000000000..f962f2c2e21 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr71494.c @@ -0,0 +1,22 @@ +/* PR middle-end/71494 */ + +int +main () +{ + void *label = &&out; + int i = 0; + void test (void) + { + label = &&out2; + goto *label; + out2:; + i++; + } + goto *label; + out: + i += 2; + test (); + if (i != 3) + __builtin_abort (); + return 0; +} diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 6fc63260000..812f619c05f 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -1347,7 +1347,7 @@ convert_nonlocal_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p, { wi->val_only = true; wi->is_lhs = false; - *handled_ops_p = true; + *handled_ops_p = false; return NULL_TREE; } break;