public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: harinath@cs.umn.edu
To: gcc-gnats@gcc.gnu.org
Subject: target/10340: Vararg functions, -fPIC and invalid assembly on i686-pc-linux-gnu
Date: Mon, 07 Apr 2003 19:06:00 -0000	[thread overview]
Message-ID: <20030407190018.22439.qmail@sources.redhat.com> (raw)


>Number:         10340
>Category:       target
>Synopsis:       Vararg functions, -fPIC and invalid assembly on i686-pc-linux-gnu
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 07 19:06:02 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     harinath@cs.umn.edu
>Release:        gcc version 3.4 20030404 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
Compiling the following simple program:

  static struct { int i; int j; } s;
  int fnV (int, ...);
  void fnA (void)
  {
    fnV(s.j, fnV(s.j));
  }

with -fPIC -O1 or -fPIC -O2 gives:

  $  gcc -c -fPIC -O1 foo.c
  /tmp/ccxT9xXg.s: Assembler messages:
  /tmp/ccxT9xXg.s:13: Error: suffix or operands invalid for `lea'

The assemblers I tried were

  GNU assembler version 2.12.90.0.1 (i386-linux) using BFD version 2.12.90.0.1 20020307 Debian/GNU Linux
  GNU assembler version 2.13.90 (i686-pc-linux-gnu) using BFD version 2.13.90 20030407
>How-To-Repeat:
gcc -c -fPIC -O1 foo.c
gcc -c -fPIC -O2 foo.c
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="foo.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo.c"

c3RhdGljIHN0cnVjdCB7IGludCBpOyBpbnQgajsgfSBzOwoKaW50IGZuViAoaW50LCAuLi4pOwp2
b2lkIGZuQSAodm9pZCkKewogIGZuVihzLmosIGZuVihzLmopKTsKfQo=


             reply	other threads:[~2003-04-07 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-07 19:06 harinath [this message]
2003-04-07 20:06 Raja R Harinath
2003-04-07 20:16 Jan Hubicka
2003-04-07 20:38 bangerth

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=20030407190018.22439.qmail@sources.redhat.com \
    --to=harinath@cs.umn.edu \
    --cc=gcc-gnats@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).