aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-06-25 08:21:31 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-06-25 08:21:31 +0000
commit8a845901e416539127df54145b12e21f478a073e (patch)
treed17ac62869d6b801084f4d627b18b272451970dd /gcc/passes.c
parent9d2cdf250068307056a91fc8b46c525e14d86aca (diff)
downloadgcc-8a845901e416539127df54145b12e21f478a073e.zip
gcc-8a845901e416539127df54145b12e21f478a073e.tar.gz
gcc-8a845901e416539127df54145b12e21f478a073e.tar.bz2
re PR middle-end/56977 (gcc -Og incorrectly warns about 'constant zero length parameter')
2013-06-25 Richard Biener <rguenther@suse.de> PR middle-end/56977 * passes.c (init_optimization_passes): Move pass_fold_builtins and pass_dce earlier with -Og. * gcc.dg/pr56977.c: New testcase. From-SVN: r200391
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index c8b03ee..761f030 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1536,15 +1536,15 @@ init_optimization_passes (void)
/* Perform simple scalar cleanup which is constant/copy propagation. */
NEXT_PASS (pass_ccp);
NEXT_PASS (pass_object_sizes);
+ /* Fold remaining builtins. */
+ NEXT_PASS (pass_fold_builtins);
/* Copy propagation also copy-propagates constants, this is necessary
- to forward object-size results properly. */
+ to forward object-size and builtin folding results properly. */
NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_dce);
NEXT_PASS (pass_asan);
NEXT_PASS (pass_tsan);
NEXT_PASS (pass_rename_ssa_copies);
- NEXT_PASS (pass_dce);
- /* Fold remaining builtins. */
- NEXT_PASS (pass_fold_builtins);
/* ??? We do want some kind of loop invariant motion, but we possibly
need to adjust LIM to be more friendly towards preserving accurate
debug information here. */