diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-06-10 21:49:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-06-10 21:49:05 +0200 |
commit | ec1c20db05b6553aaa3a7466628071404deb9fea (patch) | |
tree | 19d85b21c44aa8134aacc3510c8724ab73049b72 /gcc | |
parent | 50b15873a2268a080e06c802bf4fa75c6459ea89 (diff) | |
download | gcc-ec1c20db05b6553aaa3a7466628071404deb9fea.zip gcc-ec1c20db05b6553aaa3a7466628071404deb9fea.tar.gz gcc-ec1c20db05b6553aaa3a7466628071404deb9fea.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr71494.c | 22 | ||||
-rw-r--r-- | gcc/tree-nested.c | 2 |
4 files changed, 35 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4ce8db..0af20ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-06-10 Jakub Jelinek <jakub@redhat.com> + + 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 <msebor@redhat.com> 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 <bernd.edlinger@hotmail.de> @@ -124,7 +130,7 @@ sysroot/usr/lib/32api for additional win32 libraries, fixes failing Cygwin bootstrapping. -2016-06-09 Marcin Baczyński <marbacz@gmail.com> +2016-06-09 Marcin Baczyński <marbacz@gmail.com> * 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 <msebor@redhat.com> - Marcin Baczyński <marbacz@gmail.com> + Marcin Baczyński <marbacz@gmail.com> 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 cf9c24b..c35bcb6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2016-06-10 Jakub Jelinek <jakub@redhat.com> + 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 0000000..f962f2c --- /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 6fc6326..812f619 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; |