re PR lto/43946 (SPEC2000 GCC fails to build with -fprofile-generate -O2 -ffast...
authorRichard Guenther <rguenther@suse.de>
Fri, 30 Apr 2010 13:23:25 +0000 (13:23 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 30 Apr 2010 13:23:25 +0000 (13:23 +0000)
2010-04-30  Richard Guenther  <rguenther@suse.de>

PR lto/43946
* passes.c (init_optimization_passes): Move pass_ipa_free_lang_data
first after all lowering passes.

* gcc.dg/lto/20100430-1_0.c: New testcase.

From-SVN: r158935

gcc/ChangeLog
gcc/passes.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/20100430-1_0.c [new file with mode: 0644]

index 4d295e31d2cad32dea24c2bebfc1dab83fc23ba8..31be26350872826a4c7f93b550f3413d53ee8c06 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-30  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/43946
+       * passes.c (init_optimization_passes): Move pass_ipa_free_lang_data
+       first after all lowering passes.
+
 2010-04-30  Steven Bosscher  <steven@gcc.gnu.org>
 
        * toplev.c: Include varray.h for statistics dumping.
index 7a5d16f8a247ae5e40c3e94e496dac5652bca6b8..f482437e79d426a9387db559c57403814a242f6e 100644 (file)
@@ -748,6 +748,7 @@ init_optimization_passes (void)
 
   /* Interprocedural optimization passes.  */
   p = &all_small_ipa_passes;
+  NEXT_PASS (pass_ipa_free_lang_data);
   NEXT_PASS (pass_ipa_function_and_variable_visibility);
   NEXT_PASS (pass_ipa_early_inline);
     {
@@ -756,7 +757,6 @@ init_optimization_passes (void)
       NEXT_PASS (pass_inline_parameters);
       NEXT_PASS (pass_rebuild_cgraph_edges);
     }
-  NEXT_PASS (pass_ipa_free_lang_data);
   NEXT_PASS (pass_early_local_passes);
     {
       struct opt_pass **p = &pass_early_local_passes.pass.sub;
index 886e8103212f849b389ea8c1d319ab3118efe314..e4ff4a6e2f24a11f2a48ee38590b1809f3a71fe9 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-30  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/43946
+       * gcc.dg/lto/20100430-1_0.c: New testcase.
+
 2010-04-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/43942
diff --git a/gcc/testsuite/gcc.dg/lto/20100430-1_0.c b/gcc/testsuite/gcc.dg/lto/20100430-1_0.c
new file mode 100644 (file)
index 0000000..d2e79c6
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-O2 -fprofile-arcs -flto -r -nostdlib}} } */
+
+void
+expand_stmt_with_iterators_1 (void)
+{
+  extern void expand_expr_stmt (void);
+  expand_expr_stmt ();
+}
+void
+iterator_expand (void)
+{
+  expand_stmt_with_iterators_1 ();
+}