re PR tree-optimization/18298 (bad code from lim ssa pass with strcmp)
2004-11-30 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/18298 * tree-optimize.c (init_tree_optimization_passes): Add a may_alias pass right after fold builtins. 2004-11-30 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/18298 * gcc.c-torture/execute/p18298.c: New test. From-SVN: r91529
This commit is contained in:
parent
00bda9206b
commit
209e170cf4
@ -1,3 +1,9 @@
|
||||
2004-11-30 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR tree-opt/18298
|
||||
* tree-optimize.c (init_tree_optimization_passes): Add a may_alias
|
||||
pass right after fold builtins.
|
||||
|
||||
2004-11-30 Andreas Krebbel <krebbel1@de.ibm.com>
|
||||
|
||||
* config/s390/s390-modes.def: Added cc modes documentation.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-11-30 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR tree-opt/18298
|
||||
* gcc.c-torture/execute/p18298.c: New test.
|
||||
|
||||
2004-11-30 Ira Rosen <irar@il.ibm.com>
|
||||
Dorit Naishlos <dorit@il.ibm.com>
|
||||
|
||||
|
18
gcc/testsuite/gcc.c-torture/execute/p18298.c
Normal file
18
gcc/testsuite/gcc.c-torture/execute/p18298.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
int strcmp (const char*, const char*);
|
||||
char s[2048] = "a";
|
||||
inline bool foo(const char *str) {
|
||||
return !strcmp(s,str);
|
||||
}
|
||||
int main() {
|
||||
int i = 0;
|
||||
while(!(foo(""))) {
|
||||
i ++;
|
||||
s[0] = '\0';
|
||||
if (i>2)
|
||||
abort ();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -372,6 +372,10 @@ init_tree_optimization_passes (void)
|
||||
NEXT_PASS (pass_ccp);
|
||||
NEXT_PASS (pass_redundant_phi);
|
||||
NEXT_PASS (pass_fold_builtins);
|
||||
/* FIXME: May alias should a TODO but for 4.0.0,
|
||||
we add may_alias right after fold builtins
|
||||
which can create arbitrary GIMPLE. */
|
||||
NEXT_PASS (pass_may_alias);
|
||||
NEXT_PASS (pass_split_crit_edges);
|
||||
NEXT_PASS (pass_pre);
|
||||
NEXT_PASS (pass_loop);
|
||||
|
Loading…
Reference in New Issue
Block a user