From: Jakub Jelinek Date: Mon, 31 Oct 2016 16:36:53 +0000 (+0100) Subject: re PR tree-optimization/77860 (ICE in gimple_build_assign_1, at gimple.c:420) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e4fa9b11255ea15a3510dfd1e3011ffebdcc530;p=gcc.git re PR tree-optimization/77860 (ICE in gimple_build_assign_1, at gimple.c:420) PR tree-optimization/77860 * tree-ssa-reassoc.c (eliminate_using_constants): Handle also integral complex and vector constants. * gcc.dg/pr77860.c: New test. From-SVN: r241706 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d462d731212..d596b177cae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2016-10-31 Jakub Jelinek + PR tree-optimization/77860 + * tree-ssa-reassoc.c (eliminate_using_constants): Handle + also integral complex and vector constants. + * dwarf2out.c (dwarf2out_define, dwarf2out_undef, output_macinfo_op, optimize_macinfo_range, save_macinfo_strings): Replace DW_MACRO_GNU_* constants with corresponding DW_MACRO_* constants. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 63b2a47ea88..037096cb4f9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-10-31 Jakub Jelinek + + PR tree-optimization/77860 + * gcc.dg/pr77860.c: New test. + 2016-10-31 Senthil Kumar Selvaraj * gcc.dg/lto/pr60449_0.c: Skip for avr. @@ -12,7 +17,6 @@ * g++.dg/warn/Wshadow-local-1.C: Likewise. * g++.dg/warn/Wshadow-local-2.C: Likewise. - 2016-10-30 Bill Schmidt PR tree-optimization/71915 diff --git a/gcc/testsuite/gcc.dg/pr77860.c b/gcc/testsuite/gcc.dg/pr77860.c new file mode 100644 index 00000000000..04346b16e77 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr77860.c @@ -0,0 +1,13 @@ +/* PR tree-optimization/77860 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-tree-vrp -fno-tree-forwprop -Wno-psabi" } */ + +typedef unsigned short V __attribute__((vector_size (16))); + +V +foo (V x, V y) +{ + V a = -x; + V b = -y; + return a * b; +} diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 99e1b414070..5dcf6720605 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -924,7 +924,7 @@ eliminate_using_constants (enum tree_code opcode, tree type = TREE_TYPE (oelast->op); if (oelast->rank == 0 - && (INTEGRAL_TYPE_P (type) || FLOAT_TYPE_P (type))) + && (ANY_INTEGRAL_TYPE_P (type) || FLOAT_TYPE_P (type))) { switch (opcode) {