aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2011-02-17 16:18:24 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2011-02-17 16:18:24 +0000
commitbb7e6d55dac07daafb45645002be2798f78c87b2 (patch)
treea5366c0ffa8ef61e2d0da52de00aa6d5a7cf2871 /gcc/testsuite
parentf181a8a73f8b1e0a36659eddcdd94f89ce897561 (diff)
downloadgcc-bb7e6d55dac07daafb45645002be2798f78c87b2.zip
gcc-bb7e6d55dac07daafb45645002be2798f78c87b2.tar.gz
gcc-bb7e6d55dac07daafb45645002be2798f78c87b2.tar.bz2
re PR debug/47106 (-fcompare-debug failure (length) with -fpartial-inlining -flto -fconserve-stack)
PR debug/47106 PR debug/47402 * cfgexpand.c (account_used_vars_for_block): Remove. (estimated_stack_frame_size): Use referenced vars. * tree-inline.c (remap_decl): Only mark VAR_DECLs as referenced that were referenced in the original function. Test src_fn rather than cfun. Drop redundant get_var_ann. (setup_one_parameter): Drop redundant get_var_ann. (declare_return_variable): Likewise. (copy_decl_for_dup_finish): Mark VAR_DECLs referenced in src_fn. (copy_arguments_for_versioning): Drop redundant get_var_ann. * ipa-inline.c (compute_inline_parameters): Do not compute disregard_inline_limits here. are not available. (compute_inlinable_for_current, pass_inlinable): New. (pass_inline_parameters): Require PROP_referenced_vars. * cgraphunit.c (cgraph_process_new_functions): Don't run compute_inline_parameters explicitly unless function is in SSA form. (cgraph_analyze_function): Set .disregard_inline_limits. * tree-sra.c (convert_callers): Compute inliner parameters only for functions already in SSA form. * g++.dg/debug/pr47106.C: New. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r170249
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/debug/pr47106.C37
2 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ba0a728..ad376c2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-17 Alexandre Oliva <aoliva@redhat.com>
+ Jan Hubicka <jh@suse.cz>
+
+ PR debug/47106
+ PR debug/47402
+ * g++.dg/debug/pr47106.C: New.
+
2011-02-17 Uros Bizjak <ubizjak@gmail.com>
PR target/43653
diff --git a/gcc/testsuite/g++.dg/debug/pr47106.C b/gcc/testsuite/g++.dg/debug/pr47106.C
new file mode 100644
index 0000000..079f424
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr47106.C
@@ -0,0 +1,37 @@
+// { dg-do compile }
+// { dg-options "-O -fpartial-inlining -flto -fconserve-stack -fcompare-debug" }
+
+void end (int, int) __attribute__ ((__noreturn__));
+
+struct S
+{
+ int i;
+ S *s;
+};
+
+inline bool f (S *s)
+{
+ if (!s->s)
+ end (0, 0);
+ return s->s == s;
+}
+
+inline bool
+baz (S s1, S)
+{
+ while (f (&s1));
+}
+
+inline bool
+bar (S s1, S s2, S)
+{
+ baz (s1, s2);
+}
+
+S getS ();
+
+bool
+foo ()
+{
+ bar (getS (), getS (), getS ());
+}