public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Geoffrey Keating <geoffk@redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c/3711: rename 20020307-2.c after change Date: Fri, 12 Apr 2002 13:46:00 -0000 [thread overview] Message-ID: <20020412204601.396.qmail@sources.redhat.com> (raw) The following reply was made to PR c/3711; it has been noted by GNATS. From: Geoffrey Keating <geoffk@redhat.com> To: gcc-patches@gcc.gnu.org, gcc-gnats@gcc.gnu.org, rth@redhat.com Cc: Subject: Re: c/3711: rename 20020307-2.c after change Date: Fri, 12 Apr 2002 13:41:31 -0700 Way back in March, rth changed 20020307-2.c in mainline, which made it fail, but didn't change its name... This patch corrects the oversight. Bootstrapped & tested with the C language only. -- Geoff Keating <geoffk@redhat.com> ===File ~/patches/gcc-20020702-2-rename.patch=============== Index: ChangeLog =================================================================== RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v retrieving revision 1.1800 diff -p -u -p -r1.1800 ChangeLog --- ChangeLog 12 Apr 2002 10:59:27 -0000 1.1800 +++ ChangeLog 12 Apr 2002 20:23:00 -0000 @@ -1,3 +1,8 @@ +2002-04-12 Geoffrey Keating <geoffk@redhat.com> + + * gcc.c-torture/execute/20020412-1.c: New file, renamed from + gcc.c-torture/execute/20020307-2.c. + 2002-04-12 Richard Sandiford <rsandifo@redhat.com> * g++.dg/ext/attrib5.C, Index: gcc.c-torture/execute/20020307-2.c =================================================================== RCS file: gcc.c-torture/execute/20020307-2.c diff -N gcc.c-torture/execute/20020307-2.c --- gcc.c-torture/execute/20020307-2.c 26 Mar 2002 08:53:14 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,56 +0,0 @@ -/* PR c/3711 - This testcase ICEd on IA-32 at -O0 and was miscompiled otherwise, - because std_expand_builtin_va_arg didn't handle variable size types. */ - -#include <stdarg.h> - -extern void abort (void); -extern void exit (int); - -void bar (int c) -{ - static int d = '0'; - - if (c != d++) - abort (); - if (c < '0' || c > '9') - abort (); -} - -void foo (int size, ...) -{ - struct - { - char x[size]; - } d; - va_list ap; - int i; - - va_start (ap, size); - d = va_arg (ap, typeof (d)); - for (i = 0; i < size; i++) - bar (d.x[i]); - d = va_arg (ap, typeof (d)); - for (i = 0; i < size; i++) - bar (d.x[i]); - va_end (ap); -} - -int main (void) -{ - int z = 5; - struct { char a[z]; } x, y; - - x.a[0] = '0'; - x.a[1] = '1'; - x.a[2] = '2'; - x.a[3] = '3'; - x.a[4] = '4'; - y.a[0] = '5'; - y.a[1] = '6'; - y.a[2] = '7'; - y.a[3] = '8'; - y.a[4] = '9'; - foo (z, x, y); - exit (0); -} Index: gcc.c-torture/execute/20020412-1.c =================================================================== RCS file: gcc.c-torture/execute/20020412-1.c diff -N gcc.c-torture/execute/20020412-1.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gcc.c-torture/execute/20020412-1.c 12 Apr 2002 20:23:01 -0000 @@ -0,0 +1,56 @@ +/* PR c/3711 + This testcase ICEd on IA-32 at -O0 and was miscompiled otherwise, + because std_expand_builtin_va_arg didn't handle variable size types. */ + +#include <stdarg.h> + +extern void abort (void); +extern void exit (int); + +void bar (int c) +{ + static int d = '0'; + + if (c != d++) + abort (); + if (c < '0' || c > '9') + abort (); +} + +void foo (int size, ...) +{ + struct + { + char x[size]; + } d; + va_list ap; + int i; + + va_start (ap, size); + d = va_arg (ap, typeof (d)); + for (i = 0; i < size; i++) + bar (d.x[i]); + d = va_arg (ap, typeof (d)); + for (i = 0; i < size; i++) + bar (d.x[i]); + va_end (ap); +} + +int main (void) +{ + int z = 5; + struct { char a[z]; } x, y; + + x.a[0] = '0'; + x.a[1] = '1'; + x.a[2] = '2'; + x.a[3] = '3'; + x.a[4] = '4'; + y.a[0] = '5'; + y.a[1] = '6'; + y.a[2] = '7'; + y.a[3] = '8'; + y.a[4] = '9'; + foo (z, x, y); + exit (0); +} ============================================================
reply other threads:[~2002-04-12 20:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020412204601.396.qmail@sources.redhat.com \ --to=geoffk@redhat.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).