pr27003.c: New test.

* gcc.dg/pr27003.c: New test.

From-SVN: r113743
This commit is contained in:
Zdenek Dvorak 2006-05-13 21:52:31 +02:00 committed by Zdenek Dvorak
parent ccce691788
commit becd11a1d8
2 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2006-05-13 Zdenek Dvorak <dvorakz@suse.cz>
* gcc.dg/pr27003.c: New test.
2006-05-12 Steve Ellcey <sje@cup.hp.com>
* lib/target-supports.dg (check_cxa_atexit_available): Change

View File

@ -0,0 +1,31 @@
/* { dg-do compile } */
/* { dg-do run } */
/* { dg-options "-Os" } */
unsigned int
foo (unsigned int x)
{
unsigned int r = x;
while (--x)
r *= x;
return r;
}
unsigned long long
bar (unsigned long long x)
{
unsigned long long r = x;
while (--x)
r *= x;
return r;
}
extern void abort (void);
int
main (void)
{
if (foo (5) != 120 || bar (5) != 120)
abort ();
return 0;
}