mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-18 04:20:25 +08:00
re PR middle-end/34088 (ICE with uninitialized variable and -Werror)
PR middle-end/34088 * tree-ssa.c (delete_tree_ssa): Don't call fini_ssa_operands if init_ssa_operands has not been called for cfun. * gcc.dg/pr34088.c: New test. From-SVN: r130187
This commit is contained in:
parent
3bc8ba2577
commit
f7bc70c5bf
@ -1,3 +1,9 @@
|
||||
2007-11-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/34088
|
||||
* tree-ssa.c (delete_tree_ssa): Don't call fini_ssa_operands if
|
||||
init_ssa_operands has not been called for cfun.
|
||||
|
||||
2007-11-14 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR tree-optimization/34046
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-11-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/34088
|
||||
* gcc.dg/pr34088.c: New test.
|
||||
|
||||
2007-11-14 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* gcc.c-torture/compile/20071114-1.c: New test.
|
||||
|
24
gcc/testsuite/gcc.dg/pr34088.c
Normal file
24
gcc/testsuite/gcc.dg/pr34088.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* PR middle-end/34088 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -Wall -Werror" } */
|
||||
|
||||
int F0 (int);
|
||||
int F1 (int t) { return F0(t); }
|
||||
int F2 (int t) { return F0(t); }
|
||||
|
||||
extern int X[];
|
||||
static inline int foo(int i)
|
||||
{
|
||||
return X[i];
|
||||
}
|
||||
|
||||
int bar(int* p)
|
||||
{
|
||||
int i;
|
||||
|
||||
while ( ({ if (foo(*p) && foo(*p)); p; }) );
|
||||
|
||||
return i; /* { dg-error "is used uninitialized" } */
|
||||
}
|
||||
|
||||
/* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
|
@ -899,7 +899,8 @@ delete_tree_ssa (void)
|
||||
fini_ssanames ();
|
||||
fini_phinodes ();
|
||||
/* we no longer maintain the SSA operand cache at this point. */
|
||||
fini_ssa_operands ();
|
||||
if (ssa_operands_active ())
|
||||
fini_ssa_operands ();
|
||||
|
||||
cfun->gimple_df->global_var = NULL_TREE;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user