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
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.
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));
}
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.
--- /dev/null
+/* PR c/79413 */
+
+void
+foo ()
+{
+ int a[1/0];
+}
+
+void
+bar (void)
+{
+ foo ();
+}