public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: lucho <lucho@haemimont.bg>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/6398: faulty code when inlining in a var-arged function
Date: Mon, 22 Apr 2002 09:46:00 -0000	[thread overview]
Message-ID: <20020422164603.22850.qmail@sources.redhat.com> (raw)

The following reply was made to PR optimization/6398; it has been noted by GNATS.

From: lucho <lucho@haemimont.bg>
To: jakub@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	lucho@haemimont.bg, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: optimization/6398: faulty code when inlining in a var-arged function
Date: Mon, 22 Apr 2002 18:45:29 +0300

 This is a multi-part message in MIME format.
 --------------010302030908040209010702
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 here is the preprocessed source (as attachment)
 i haven't installed other gcc than 3.0 yet and so cannot test other versions
 
 --------------010302030908040209010702
 Content-Type: text/plain;
  name="bug.i"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="bug.i"
 
 # 1 "bug.c"
 # 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.0/include/stdarg.h" 1 3
 # 43 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.0/include/stdarg.h" 3
 typedef __builtin_va_list __gnuc_va_list;
 # 110 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.0/include/stdarg.h" 3
 typedef __gnuc_va_list va_list;
 # 2 "bug.c" 2
 
 
 static void f1(int p, char *fmt, va_list args)
 {
         char *hdr[2] = {"AAAA", "BBBB"};
         char buf[128];
         int l;
 
         if (p > 2) return;
         l = strlen(hdr[p]);
         memcpy(buf, hdr[p], l);
         vsnprintf(buf + l, 128 - l, fmt, args);
         puts(buf);
 }
 
 void f2(int p, char *fmt, ...)
 {
         va_list args;
         __builtin_stdarg_start((args),fmt);
         f1(p, fmt, args);
         __builtin_va_end(args);
 }
 
 int main()
 {
         f2(0, "xyz");
         return 0;
 }
 
 --------------010302030908040209010702--
 


             reply	other threads:[~2002-04-22 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22  9:46 lucho [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-06 15:30 reichelt
2002-04-21 14:45 jakub
2002-04-21 13:46 Andrew Pinski
2002-04-21 13:16 lucho

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=20020422164603.22850.qmail@sources.redhat.com \
    --to=lucho@haemimont.bg \
    --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: link
Be 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).