PR middle-end/64391
* trans-mem.c (get_attrs_for): Return NULL_TREE if X is NULL_TREE.
* gcc.dg/tm/pr64391.c: New test.
From-SVN: r219555
+2015-01-13 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/64391
+ * trans-mem.c (get_attrs_for): Return NULL_TREE if X is NULL_TREE.
+
2015-01-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/64286
+2015-01-13 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/64391
+ * gcc.dg/tm/pr64391.c: New test.
+
2015-01-13 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/tree-ssa/ssa-store-ccp-3.c: Exclude pie when nonpic is
--- /dev/null
+/* PR middle-end/64391 */
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm" } */
+
+void
+foo (void)
+{
+#pragma GCC ivdep
+ while (1);
+}
static tree
get_attrs_for (const_tree x)
{
+ if (x == NULL_TREE)
+ return NULL_TREE;
+
switch (TREE_CODE (x))
{
case FUNCTION_DECL:
default:
if (TYPE_P (x))
- return NULL;
+ return NULL_TREE;
x = TREE_TYPE (x);
if (TREE_CODE (x) != POINTER_TYPE)
- return NULL;
+ return NULL_TREE;
/* FALLTHRU */
case POINTER_TYPE:
x = TREE_TYPE (x);
if (TREE_CODE (x) != FUNCTION_TYPE && TREE_CODE (x) != METHOD_TYPE)
- return NULL;
+ return NULL_TREE;
/* FALLTHRU */
case FUNCTION_TYPE: