public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/12270] New: GCC does not honour __attribute__((regparm(3))) when calling function via pointer in array
@ 2003-09-14  0:37 mikulas at artax dot karlin dot mff dot cuni dot cz
  2003-09-14  0:38 ` [Bug target/12270] " mikulas at artax dot karlin dot mff dot cuni dot cz
  2003-09-17  7:11 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: mikulas at artax dot karlin dot mff dot cuni dot cz @ 2003-09-14  0:37 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12270

           Summary: GCC does not honour __attribute__((regparm(3))) when
                    calling function via pointer in array
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mikulas at artax dot karlin dot mff dot cuni dot cz
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu

The attached file demonstrates a bug in gcc calling conventions. When calling
function via pointer in array, gcc calls it with normal "regparm(0)" convention
instead of regparm(3) convention that was specified as an attribute for array
type. Bug is present in gcc 3.3.1. Bug does not seem to be present in gcc 3.0.4
and gcc 3.4.

Compile the file (without optimization) and run it. It exits on abort. Look at
assembler at function b. It calls array element with arguments on stack.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/12270] GCC does not honour __attribute__((regparm(3))) when calling function via pointer in array
  2003-09-14  0:37 [Bug target/12270] New: GCC does not honour __attribute__((regparm(3))) when calling function via pointer in array mikulas at artax dot karlin dot mff dot cuni dot cz
@ 2003-09-14  0:38 ` mikulas at artax dot karlin dot mff dot cuni dot cz
  2003-09-17  7:11 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: mikulas at artax dot karlin dot mff dot cuni dot cz @ 2003-09-14  0:38 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12270



------- Additional Comments From mikulas at artax dot karlin dot mff dot cuni dot cz  2003-09-13 22:24 -------
Created an attachment (id=4752)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4752&action=view)
regparm bug

Compile the file with gcc 3.3.1 without optimizations.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/12270] GCC does not honour __attribute__((regparm(3))) when calling function via pointer in array
  2003-09-14  0:37 [Bug target/12270] New: GCC does not honour __attribute__((regparm(3))) when calling function via pointer in array mikulas at artax dot karlin dot mff dot cuni dot cz
  2003-09-14  0:38 ` [Bug target/12270] " mikulas at artax dot karlin dot mff dot cuni dot cz
@ 2003-09-17  7:11 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-17  7:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12270


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-17 06:05 -------
This is a dup of bug 12236.

*** This bug has been marked as a duplicate of 12236 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-17  6:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-14  0:37 [Bug target/12270] New: GCC does not honour __attribute__((regparm(3))) when calling function via pointer in array mikulas at artax dot karlin dot mff dot cuni dot cz
2003-09-14  0:38 ` [Bug target/12270] " mikulas at artax dot karlin dot mff dot cuni dot cz
2003-09-17  7:11 ` pinskia at gcc dot gnu dot org

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).