aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-10-31 17:36:53 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-10-31 17:36:53 +0100
commit1e4fa9b11255ea15a3510dfd1e3011ffebdcc530 (patch)
tree02f439cea6eedaa3c53b1e6b687c8ca3064e8283 /gcc
parent520c47e803fb8c94b864d4a1dd0f79153eae7835 (diff)
downloadgcc-1e4fa9b11255ea15a3510dfd1e3011ffebdcc530.zip
gcc-1e4fa9b11255ea15a3510dfd1e3011ffebdcc530.tar.gz
gcc-1e4fa9b11255ea15a3510dfd1e3011ffebdcc530.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/pr77860.c13
-rw-r--r--gcc/tree-ssa-reassoc.c2
4 files changed, 23 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d462d73..d596b17 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2016-10-31 Jakub Jelinek <jakub@redhat.com>
+ 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 63b2a47..037096c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/77860
+ * gcc.dg/pr77860.c: New test.
+
2016-10-31 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* 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 <wschmidt@linux.vnet.ibm.com>
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 0000000..04346b1
--- /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 99e1b41..5dcf672 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)
{