pr27003.c: New test.
* gcc.dg/pr27003.c: New test. From-SVN: r113743
This commit is contained in:
parent
ccce691788
commit
becd11a1d8
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue