re PR tree-optimization/70152 (gcc ICE at -O3 and above on valid code on x86_64-linux-gnu in "replace_uses_by")

PR tree-optimization/70152
	* tree-sra.c (replace_removed_params_ssa_names): Copy over
	SSA_NAME_OCCURS_IN_ABNORMAL_PHI from old_name to new_name.

	* gcc.dg/pr70152.c: New test.

From-SVN: r234092
This commit is contained in:
Jakub Jelinek 2016-03-09 21:12:19 +01:00 committed by Jakub Jelinek
parent 3433b975ae
commit c2864f02e0
4 changed files with 36 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2016-03-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/70152
* tree-sra.c (replace_removed_params_ssa_names): Copy over
SSA_NAME_OCCURS_IN_ABNORMAL_PHI from old_name to new_name.
PR target/70086
* config/i386/i386.md (truncdfsf2 splitter): Use gen_vec_concatv2df
instead of gen_sse2_loadlpd.

View File

@ -1,5 +1,8 @@
2016-03-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/70152
* gcc.dg/pr70152.c: New test.
PR target/70086
* gcc.target/i386/pr70086-1.c: New test.
* gcc.target/i386/pr70086-2.c: New test.

View File

@ -0,0 +1,27 @@
/* PR tree-optimization/70152 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
int a;
int foo (void);
int setjmp (char *);
char buf[64];
static int
bar (int x)
{
x = 0;
setjmp (buf);
for (;;)
{
switch (x)
case 5:
x = foo ();
}
}
void
baz (void)
{
bar (a);
}

View File

@ -4758,6 +4758,8 @@ replace_removed_params_ssa_names (tree old_name, gimple *stmt,
repl = get_replaced_param_substitute (adj);
new_name = make_ssa_name (repl, stmt);
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_name)
= SSA_NAME_OCCURS_IN_ABNORMAL_PHI (old_name);
if (dump_file)
{