Message ID | CA9BBF0458F83C4F9051448B941B57D116541BD3@glaexch1 |
---|---|
State | New |
Headers | show |
On Dec 31, 2014, at 8:46 AM, James Bowman <james.bowman@ftdichip.com> wrote: > Test pr20621 requires a target with more than 64K of available stack. > This patch adds a path to pass the test when the target has declared > a STACK_SIZE of 64K or less > > 2014-12-30 James Bowman <james.bowman@ftdichip.com> > > * gcc/testsuite/gcc.c-torture/execute/pr20621-1.c: > pass if stack < 64K Be sure to ask Ok? on work you want reviewed and approved explicitly. Feels like you wanted to ask, but did not. Ok. On the changelog comment, upper case the first letter and end with a period. Pass if stack < 64K.
Index: gcc/testsuite/gcc.c-torture/execute/pr20621-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/pr20621-1.c (revision 215531) +++ gcc/testsuite/gcc.c-torture/execute/pr20621-1.c (working copy) @@ -1,6 +1,10 @@ /* When generating o32 MIPS PIC, main's $gp save slot was out of range of a single load instruction. */ +#if defined(STACK_SIZE) && STACK_SIZE <= 0x10000 +int main (void) { return 0; } +#else struct big { int i[sizeof (int) >= 4 && sizeof (void *) >= 4 ? 0x4000 : 4]; }; struct big gb; int foo (struct big b, int x) { return b.i[x]; } int main (void) { return foo (gb, 0) + foo (gb, 1); } +#endif