aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-02-09 15:26:40 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-02-09 15:26:40 +0100
commit28f6839be16de2fd4143a5395800bb002359b27b (patch)
treebc632643a2ce7286443a3590e6727f2878a11c47 /gcc
parentf08683a154522492e2fdc9e970b145cd37f242de (diff)
downloadgcc-28f6839be16de2fd4143a5395800bb002359b27b.zip
gcc-28f6839be16de2fd4143a5395800bb002359b27b.tar.gz
gcc-28f6839be16de2fd4143a5395800bb002359b27b.tar.bz2
re PR c/79413 (ICE in make_ssa_name_fn, at tree-ssanames.c:265)
PR c/79413 * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants, not arbitrary TREE_CONSTANT. * gcc.c-torture/compile/pr79413.c: New test. From-SVN: r245304
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/gimplify.h2
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr79413.c13
4 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 184e7d1..416961b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2017-02-09 Jakub Jelinek <jakub@redhat.com>
+ PR c/79413
+ * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
+ not arbitrary TREE_CONSTANT.
+
PR c/79431
* gimplify.c (gimplify_adjust_omp_clauses): Ignore
"omp declare target link" attribute unless is_global_var.
diff --git a/gcc/gimplify.h b/gcc/gimplify.h
index 5d39544..394d385 100644
--- a/gcc/gimplify.h
+++ b/gcc/gimplify.h
@@ -99,7 +99,7 @@ is_gimple_sizepos (tree expr)
but that will cause problems if this type is from outside the function.
It's OK to have that here. */
return (expr == NULL_TREE
- || TREE_CONSTANT (expr)
+ || TREE_CODE (expr) == INTEGER_CST
|| TREE_CODE (expr) == VAR_DECL
|| CONTAINS_PLACEHOLDER_P (expr));
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8a64e72..5ca83f2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2017-02-09 Jakub Jelinek <jakub@redhat.com>
+ PR c/79413
+ * gcc.c-torture/compile/pr79413.c: New test.
+
PR c++/79429
* c-c++-common/gomp/pr79429.c: New test.
* g++.dg/gomp/pr79429.C: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr79413.c b/gcc/testsuite/gcc.c-torture/compile/pr79413.c
new file mode 100644
index 0000000..602a974
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr79413.c
@@ -0,0 +1,13 @@
+/* PR c/79413 */
+
+void
+foo ()
+{
+ int a[1/0];
+}
+
+void
+bar (void)
+{
+ foo ();
+}