mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 17:40:48 +08:00
re PR tree-optimization/70169 (ICE at -O1 and above on x86_64-linux-gnu in gen_lsm_tmp_name, at tree-ssa-loop.c:791)
PR tree-optimization/70169 * tree-ssa-loop.c (gen_lsm_tmp_name): Handle FUNCTION_DECL and LABEL_DECL like VAR_DECL. Emit nothing instead of gcc_unreachable for unknown codes. * gcc.dg/pr70169.c: New test. From-SVN: r234136
This commit is contained in:
parent
0f9befa141
commit
02d472a2cb
@ -1,3 +1,10 @@
|
||||
2016-03-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/70169
|
||||
* tree-ssa-loop.c (gen_lsm_tmp_name): Handle FUNCTION_DECL and
|
||||
LABEL_DECL like VAR_DECL. Emit nothing instead of gcc_unreachable
|
||||
for unknown codes.
|
||||
|
||||
2016-03-11 Ilya Enkovich <enkovich.gnu@gmail.com>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-03-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/70169
|
||||
* gcc.dg/pr70169.c: New test.
|
||||
|
||||
2016-03-11 Ilya Enkovich <enkovich.gnu@gmail.com>
|
||||
|
||||
PR target/70160
|
||||
|
40
gcc/testsuite/gcc.dg/pr70169.c
Normal file
40
gcc/testsuite/gcc.dg/pr70169.c
Normal file
@ -0,0 +1,40 @@
|
||||
/* PR tree-optimization/70169 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fno-strict-aliasing -fno-tree-dce" } */
|
||||
|
||||
int printf (const char *, ...);
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
unsigned char *p = (unsigned char *) &printf;
|
||||
for (;;)
|
||||
(*p)++;
|
||||
}
|
||||
|
||||
void
|
||||
bar (int x)
|
||||
{
|
||||
unsigned char *p = (unsigned char *) &printf;
|
||||
int i;
|
||||
for (i = 0; i < x; i++)
|
||||
(*p)++;
|
||||
}
|
||||
|
||||
void
|
||||
baz (int x, int y)
|
||||
{
|
||||
unsigned char *p = (unsigned char *) &&lab;
|
||||
int i;
|
||||
if (y)
|
||||
{
|
||||
for (i = 0; i < x; i++)
|
||||
(*p)++;
|
||||
}
|
||||
else
|
||||
{
|
||||
lab:
|
||||
asm volatile ("");
|
||||
foo ();
|
||||
}
|
||||
}
|
@ -769,6 +769,8 @@ gen_lsm_tmp_name (tree ref)
|
||||
case SSA_NAME:
|
||||
case VAR_DECL:
|
||||
case PARM_DECL:
|
||||
case FUNCTION_DECL:
|
||||
case LABEL_DECL:
|
||||
name = get_name (ref);
|
||||
if (!name)
|
||||
name = "D";
|
||||
@ -784,11 +786,9 @@ gen_lsm_tmp_name (tree ref)
|
||||
break;
|
||||
|
||||
case INTEGER_CST:
|
||||
default:
|
||||
/* Nothing. */
|
||||
break;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user