Skip to content
Snippets Groups Projects
Commit 5de33281 authored by Tom de Vries's avatar Tom de Vries Committed by Tom de Vries
Browse files

re PR tree-optimization/51879 (Missed tail merging with non-const/pure calls)

2012-07-06  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/51879
	* gcc.dg/pr51879-16.c: New test.
	* gcc.dg/pr51879-17.c: Same.

From-SVN: r189324
parent 6867d9a9
No related branches found
No related tags found
No related merge requests found
2012-07-06 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/51879
* gcc.dg/pr51879-16.c: New test.
* gcc.dg/pr51879-17.c: Same.
2012-07-06 Tom de Vries <tom@codesourcery.com> 2012-07-06 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/52009 PR tree-optimization/52009
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre" } */
struct S {
int i;
};
extern struct S foo (void);
extern int foo2 (void);
struct S s;
int bar (int c) {
int r;
if (c)
{
s = foo ();
r = foo2 ();
}
else
{
s = foo ();
r = foo2 ();
}
return r;
}
/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
/* { dg-final { scan-tree-dump-times "foo2 \\(" 1 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre" } */
struct S {
int i;
};
extern struct S foo (void);
extern int foo2 (void);
struct S s, s2;
int bar (int c) {
int r;
if (c)
{
s = foo ();
r = foo2 ();
}
else
{
s2 = foo ();
r = foo2 ();
}
return r;
}
/* { dg-final { scan-tree-dump-times "foo \\(" 2 "pre"} } */
/* { dg-final { scan-tree-dump-times "foo2 \\(" 2 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment