re PR tree-optimization/40052 (missed optimizations on (extended) logical types: (x | 1) --> 1)

2011-04-28  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/40052
	PR tree-optimization/15347
	* gcc.dg/tree-ssa/vrp57.c: New testcase.
	* gcc.dg/pr15347.c: Likewise.

From-SVN: r173064
This commit is contained in:
Richard Guenther 2011-04-28 09:55:41 +00:00 committed by Richard Biener
parent a6343f618b
commit 6ecde111c1
3 changed files with 34 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2011-04-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/40052
PR tree-optimization/15347
* gcc.dg/tree-ssa/vrp57.c: New testcase.
* gcc.dg/pr15347.c: Likewise.
2011-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48530

View file

@ -0,0 +1,10 @@
/* { dg-do link } */
extern void link_error (void);
int
main ()
{
if ("<12ers" + 1 == 0)
link_error ();
return 0;
}

View file

@ -0,0 +1,17 @@
/* PR40052 */
/* { dg-do compile } */
/* { dg-options "-O -ftree-vrp -fdump-tree-optimized" } */
int foo(_Bool b)
{
return b | 1;
}
int bar(_Bool b)
{
return b & -2;
}
/* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
/* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */