Message ID | 54466D02.6020707@codesourcery.com |
---|---|
State | New |
Headers | show |
On 10/21/14 14:26, Bernd Schmidt wrote: > This tweaks a few tests so that we don't have to skip them. This is > mostly concerned with declaring main properly, or changing other > declarations where the test does not seem to rely on the type mismatches. > > I've also included one example of changing a function name to not be > "call", ptxas seems to have a bug that makes it not allow this function > name. If that doesn't seem too awful I'll have a few more tests to fix > up in this way. > > There'll be a 7th patch, not because I can't count, but because I didn't > follow a consistent naming scheme for the patches. > > > Bernd > > > ts-tweaks.diff > > > * gcc.c-torture/compile/920625-2.c: Add return type to > freeReturnStruct. > * gcc.c-torture/execute/20091229-1.c: Declare main properly. > * gcc.c-torture/execute/pr61375.c: Likewise. > * gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t. > * gcc.dg/pr30904.c: Remove extern from declaration of t. > * gcc.c-torture/compile/callind.c (bar): Renamed from call. Are any of these obsoleted by Marek's work around gnu11? If not, they're all fine for the trunk. jeff
On Tue, Oct 21, 2014 at 03:32:31PM +0000, Jeff Law wrote: > On 10/21/14 14:26, Bernd Schmidt wrote: > >This tweaks a few tests so that we don't have to skip them. This is > >mostly concerned with declaring main properly, or changing other > >declarations where the test does not seem to rely on the type mismatches. > > > >I've also included one example of changing a function name to not be > >"call", ptxas seems to have a bug that makes it not allow this function > >name. If that doesn't seem too awful I'll have a few more tests to fix > >up in this way. > > > >There'll be a 7th patch, not because I can't count, but because I didn't > >follow a consistent naming scheme for the patches. > > > > > >Bernd > > > > > >ts-tweaks.diff > > > > > > * gcc.c-torture/compile/920625-2.c: Add return type to > > freeReturnStruct. > > * gcc.c-torture/execute/20091229-1.c: Declare main properly. > > * gcc.c-torture/execute/pr61375.c: Likewise. > > * gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t. > > * gcc.dg/pr30904.c: Remove extern from declaration of t. > > * gcc.c-torture/compile/callind.c (bar): Renamed from call. > Are any of these obsoleted by Marek's work around gnu11? If not, they're > all fine for the trunk. I think Marek went only for stuff reported as failures in the testsuite. gcc.c-torture/compile/ defaults to -w I think, supposedly execute/ too, so C11 incompatibilities in there might not have been reported. Jakub
On Tue, Oct 21, 2014 at 06:48:55PM +0200, Jakub Jelinek wrote: > On Tue, Oct 21, 2014 at 03:32:31PM +0000, Jeff Law wrote: > > On 10/21/14 14:26, Bernd Schmidt wrote: > > >This tweaks a few tests so that we don't have to skip them. This is > > >mostly concerned with declaring main properly, or changing other > > >declarations where the test does not seem to rely on the type mismatches. > > > > > >I've also included one example of changing a function name to not be > > >"call", ptxas seems to have a bug that makes it not allow this function > > >name. If that doesn't seem too awful I'll have a few more tests to fix > > >up in this way. > > > > > >There'll be a 7th patch, not because I can't count, but because I didn't > > >follow a consistent naming scheme for the patches. > > > > > > > > >Bernd > > > > > > > > >ts-tweaks.diff > > > > > > > > > * gcc.c-torture/compile/920625-2.c: Add return type to > > > freeReturnStruct. > > > * gcc.c-torture/execute/20091229-1.c: Declare main properly. > > > * gcc.c-torture/execute/pr61375.c: Likewise. > > > * gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t. > > > * gcc.dg/pr30904.c: Remove extern from declaration of t. > > > * gcc.c-torture/compile/callind.c (bar): Renamed from call. > > Are any of these obsoleted by Marek's work around gnu11? If not, they're > > all fine for the trunk. > > I think Marek went only for stuff reported as failures in the testsuite. That's right. > gcc.c-torture/compile/ defaults to -w I think, supposedly execute/ too, > so C11 incompatibilities in there might not have been reported. I can remove the -w and fix C89/C11 incompatibilities, if anyone thinks it's worth it. Marek
On Oct 21, 2014, at 10:46 AM, Marek Polacek <polacek@redhat.com> wrote: > > I can remove the -w and fix C89/C11 incompatibilities, if anyone > thinks it's worth it. I’d leave the -w, no point in spending much time worrying about it. The -w is so that no one has to spend time worrying about it. If you want to fix the language to avoid the warnings when -w isn’t given, feel free.
* gcc.c-torture/compile/920625-2.c: Add return type to freeReturnStruct. * gcc.c-torture/execute/20091229-1.c: Declare main properly. * gcc.c-torture/execute/pr61375.c: Likewise. * gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t. * gcc.dg/pr30904.c: Remove extern from declaration of t. * gcc.c-torture/compile/callind.c (bar): Renamed from call. Index: gcc/testsuite/gcc.c-torture/compile/920625-2.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/920625-2.c.orig +++ gcc/testsuite/gcc.c-torture/compile/920625-2.c @@ -100,4 +100,4 @@ copyQueryResult(Widget w, Boolean copy, freeReturnStruct(); } -freeReturnStruct(){} +void freeReturnStruct(){} Index: gcc/testsuite/gcc.c-torture/execute/20091229-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20091229-1.c.orig +++ gcc/testsuite/gcc.c-torture/execute/20091229-1.c @@ -1,2 +1,2 @@ long long foo(long long v) { return v / -0x080000000LL; } -void main() { if (foo(0x080000000LL) != -1) abort(); exit (0); } +int main(int argc, char **argv) { if (foo(0x080000000LL) != -1) abort(); exit (0); } Index: gcc/testsuite/gcc.c-torture/execute/20111208-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20111208-1.c.orig +++ gcc/testsuite/gcc.c-torture/execute/20111208-1.c @@ -1,7 +1,7 @@ /* PR tree-optimization/51315 */ /* Reported by Jurij Smakov <jurij@wooyd.org> */ -typedef unsigned int size_t; +typedef __SIZE_TYPE__ size_t; extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/pr61375.c.orig +++ gcc/testsuite/gcc.c-torture/execute/pr61375.c @@ -19,7 +19,7 @@ uint128_central_bitsi_ior (unsigned __in } int -main(int argc) +main(int argc, char **argv) { __int128 in = 1; #ifdef __SIZEOF_INT128__ Index: gcc/testsuite/gcc.dg/pr30904.c =================================================================== --- gcc/testsuite/gcc.dg/pr30904.c.orig +++ gcc/testsuite/gcc.dg/pr30904.c @@ -1,7 +1,7 @@ /* { dg-do link } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ -extern int t; +int t; extern void link_error(void); int main (void) { Index: gcc/testsuite/gcc.c-torture/compile/callind.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/callind.c.orig +++ gcc/testsuite/gcc.c-torture/compile/callind.c @@ -1,8 +1,8 @@ -call (foo, a) +bar (foo, a) int (**foo) (); { - (foo)[1] = call; + (foo)[1] = bar; foo[a] (1); }