Commit ba224bf3 by Tom de Vries Committed by Tom de Vries

builtin-unreachable-6.c: New test.

2012-07-09  Tom de Vries  <tom@codesourcery.com>
	    Richard Guenther  <rguenther@suse.de>

	* gcc.dg/builtin-unreachable-6.c: New test.
	* gcc.dg/builtin-unreachable-5.c: New test.

Co-Authored-By: Richard Guenther <rguenther@suse.de>

From-SVN: r189384
parent c61e5cc1
2012-07-09 Tom de Vries <tom@codesourcery.com>
Richard Guenther <rguenther@suse.de>
* gcc.dg/builtin-unreachable-6.c: New test.
* gcc.dg/builtin-unreachable-5.c: New test.
2012-07-07 Steven Bosscher <steven@gcc.gnu.org>
PR tree-optimization/53881
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-fab" } */
int
foo (int a)
{
if (a <= 0)
{
L1:
__builtin_unreachable ();
}
if (a > 2)
goto L1;
return a > 0;
}
/* { dg-final { scan-tree-dump-times "if \\(" 0 "fab" } } */
/* { dg-final { scan-tree-dump-times "goto" 0 "fab" } } */
/* { dg-final { scan-tree-dump-times "L1:" 0 "fab" } } */
/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 0 "fab" } } */
/* { dg-final { cleanup-tree-dump "fab" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-fab" } */
void
foo (int b, int c)
{
void *x = &&lab;
if (b)
{
lab:
__builtin_unreachable ();
}
lab2:
if (c)
x = &&lab2;
goto *x;
}
/* { dg-final { scan-tree-dump-times "lab:" 1 "fab" } } */
/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 1 "fab" } } */
/* { dg-final { cleanup-tree-dump "fab" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment