Commit 59b8926c by Marek Polacek Committed by Marek Polacek

re PR middle-end/64391 (ICE: SIGSEGV in get_attrs_for (trans-mem.c:179) with…

re PR middle-end/64391 (ICE: SIGSEGV in get_attrs_for (trans-mem.c:179) with -fgnu-tm and #pragma GCC ivdep)

	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
parent ee57ebbf
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> 2015-01-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/64286 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> 2015-01-13 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/tree-ssa/ssa-store-ccp-3.c: Exclude pie when nonpic is * gcc.dg/tree-ssa/ssa-store-ccp-3.c: Exclude pie when nonpic is
......
/* PR middle-end/64391 */
/* { dg-do compile } */
/* { dg-options "-fgnu-tm" } */
void
foo (void)
{
#pragma GCC ivdep
while (1);
}
...@@ -183,6 +183,9 @@ static void *expand_regions (struct tm_region *, ...@@ -183,6 +183,9 @@ static void *expand_regions (struct tm_region *,
static tree static tree
get_attrs_for (const_tree x) get_attrs_for (const_tree x)
{ {
if (x == NULL_TREE)
return NULL_TREE;
switch (TREE_CODE (x)) switch (TREE_CODE (x))
{ {
case FUNCTION_DECL: case FUNCTION_DECL:
...@@ -191,16 +194,16 @@ get_attrs_for (const_tree x) ...@@ -191,16 +194,16 @@ get_attrs_for (const_tree x)
default: default:
if (TYPE_P (x)) if (TYPE_P (x))
return NULL; return NULL_TREE;
x = TREE_TYPE (x); x = TREE_TYPE (x);
if (TREE_CODE (x) != POINTER_TYPE) if (TREE_CODE (x) != POINTER_TYPE)
return NULL; return NULL_TREE;
/* FALLTHRU */ /* FALLTHRU */
case POINTER_TYPE: case POINTER_TYPE:
x = TREE_TYPE (x); x = TREE_TYPE (x);
if (TREE_CODE (x) != FUNCTION_TYPE && TREE_CODE (x) != METHOD_TYPE) if (TREE_CODE (x) != FUNCTION_TYPE && TREE_CODE (x) != METHOD_TYPE)
return NULL; return NULL_TREE;
/* FALLTHRU */ /* FALLTHRU */
case FUNCTION_TYPE: case FUNCTION_TYPE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment