[PATCH TESTSUITE]: Fix PR43495, gcc.c-torture/execute/20000603-1.c
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Wed Mar 24 18:49:00 GMT 2010
According to the comment in the PR, this testcase is undefined unless
inlining occurs. So I used a sledge hammer and made sure that happens.
Tested by compiling the modified testcase on all three affected targets
with "-O2 -fpic" and ensured that it doesn't abort any more.
Okay for mainline?
Thanks,
--Kaveh
2010-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR testsuite/43495
* gcc.c-torture/execute/20000603-1.c: Ensure inlining.
diff -rup orig/egcc-SVN20100324/gcc/testsuite/gcc.c-torture/execute/20000603-1.c egcc-SVN20100324/gcc/testsuite/gcc.c-torture/execute/20000603-1.c
--- orig/egcc-SVN20100324/gcc/testsuite/gcc.c-torture/execute/20000603-1.c 2008-03-14 00:36:24.000000000 +0100
+++ egcc-SVN20100324/gcc/testsuite/gcc.c-torture/execute/20000603-1.c 2010-03-24 19:15:58.000000000 +0100
@@ -6,7 +6,9 @@ struct s1 { double d; };
struct s2 { double d; };
union u { struct s1 x; struct s2 y; };
-double f(struct s1 *a, struct s2 *b)
+/* This function must be inlined, see PR43495. */
+static inline double __attribute__ ((__always_inline__))
+f(struct s1 *a, struct s2 *b)
{
a->d = 1.0;
return b->d + 1.0;
More information about the Gcc-patches
mailing list