2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-09 16:11:28 +08:00

builtin-unreachable.c: New test.

2009-06-17  David Daney  <ddaney@caviumnetworks.com>

	* gcc.target/i386/builtin-unreachable.c: New test.

From-SVN: r148622
This commit is contained in:
David Daney 2009-06-17 19:14:56 +00:00 committed by David Daney
parent 8288224021
commit f9c3538320
2 changed files with 17 additions and 0 deletions
gcc/testsuite

@ -1,3 +1,7 @@
2009-06-17 David Daney <ddaney@caviumnetworks.com>
* gcc.target/i386/builtin-unreachable.c: New test.
2009-06-17 Ian Lance Taylor <iant@google.com>
* gcc.dg/Wcxx-compat-14.c: New testcase.

@ -0,0 +1,13 @@
/* This should return 1 without setting up a stack frame or
jumping. */
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
int h (char *p)
{
if (*p)
__builtin_unreachable ();
return p ? 1 : 0;
}
/* { dg-final { scan-assembler-not "%e\[bs\]p" } } */
/* { dg-final { scan-assembler-not "\[\\t \]+j" } } */