public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39496]  New: GCC uses non-standard calling conventions, even with -O0
@ 2009-03-18 21:10 jimb at red-bean dot com
  2009-03-18 21:12 ` [Bug c++/39496] " jimb at red-bean dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: jimb at red-bean dot com @ 2009-03-18 21:10 UTC (permalink / raw)
  To: gcc-bugs

Even when compiling with -O0, GCC uses non-standard parameter passing
conventions for static inline functions, which makes debugging difficult.

In this case, the function of interest converts a tagged value to a pointer;
it's very helpful to be able to use this in GDB 'print' commands.

In the assembly code shown, notice that the function is expecting to find its
argument in %eax, even though the standard IA-32 calling conventions pass the
first argument on the stack.  The GDB session also demonstrates this.

$ (cd ~/gcc/gcc; svn info)
Path: .
URL: svn://gcc.gnu.org/svn/gcc/trunk
Repository Root: svn://gcc.gnu.org/svn/gcc
Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
Revision: 144927
Node Kind: directory
Schedule: normal
Last Changed Author: gccadmin
Last Changed Rev: 144927
Last Changed Date: 2009-03-17 17:16:40 -0700 (Tue, 17 Mar 2009)

$ cat jsobj.i
extern "C"
{
  static inline struct JSObject *JSVAL_TO_OBJECT (int v)
  {
    return (struct JSObject *) (v & ~3);
  }
}
static int
obj_toSource (int *vp)
{
  JSVAL_TO_OBJECT (vp[0]);
}
int
main(int argc, char **argv)
{
}
$ c++ -v -O0 -g jsobj.i -o jsobj -save-temps
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/jimb/gcc
--enable-languages=c,c++
Thread model: posix
gcc version 4.4.0 20090318 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-O0' '-g' '-o' 'jsobj' '-save-temps' '-shared-libgcc'
'-mtune=generic'
 /home/jimb/gcc/libexec/gcc/i686-pc-linux-gnu/4.4.0/cc1plus -fpreprocessed
jsobj.i -quiet -dumpbase jsobj.i -mtune=generic -auxbase jsobj -g -O0 -version
-o jsobj.s
GNU C++ (GCC) version 4.4.0 20090318 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.4.0 20090318 (experimental), GMP version
4.2.2, MPFR version 2.3.2.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 00b593c3c99bbacc875575ff2b6655cc
COLLECT_GCC_OPTIONS='-v' '-O0' '-g' '-o' 'jsobj' '-save-temps' '-shared-libgcc'
'-mtune=generic'
 as -V -Qy -o jsobj.o jsobj.s
GNU assembler version 2.18.93 (i486-linux-gnu) using BFD version (GNU Binutils
for Ubuntu) 2.18.93.20081009
COMPILER_PATH=/home/jimb/gcc/libexec/gcc/i686-pc-linux-gnu/4.4.0/:/home/jimb/gcc/libexec/gcc/i686-pc-linux-gnu/4.4.0/:/home/jimb/gcc/libexec/gcc/i686-pc-linux-gnu/:/home/jimb/gcc/lib/gcc/i686-pc-linux-gnu/4.4.0/:/home/jimb/gcc/lib/gcc/i686-pc-linux-gnu/
LIBRARY_PATH=/home/jimb/gcc/lib/gcc/i686-pc-linux-gnu/4.4.0/:/home/jimb/gcc/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-O0' '-g' '-o' 'jsobj' '-save-temps' '-shared-libgcc'
'-mtune=generic'
 /home/jimb/gcc/libexec/gcc/i686-pc-linux-gnu/4.4.0/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o jsobj /usr/lib/crt1.o
/usr/lib/crti.o /home/jimb/gcc/lib/gcc/i686-pc-linux-gnu/4.4.0/crtbegin.o
-L/home/jimb/gcc/lib/gcc/i686-pc-linux-gnu/4.4.0
-L/home/jimb/gcc/lib/gcc/i686-pc-linux-gnu/4.4.0/../../.. jsobj.o -lstdc++ -lm
-lgcc_s -lgcc -lc -lgcc_s -lgcc
/home/jimb/gcc/lib/gcc/i686-pc-linux-gnu/4.4.0/crtend.o /usr/lib/crtn.o
$ cat jsobj.s
...
JSVAL_TO_OBJECT:
.LFB0:
        .file 1 "jsobj.i"
        .loc 1 4 0
        .cfi_startproc
        .cfi_personality 0x0,__gxx_personality_v0
        pushl   %ebp
        .cfi_def_cfa_offset 8
        movl    %esp, %ebp
        .cfi_offset 5, -8
        .cfi_def_cfa_register 5
        subl    $4, %esp
        movl    %eax, -4(%ebp)
        .loc 1 5 0
        movl    -4(%ebp), %eax
        andl    $-4, %eax
        .loc 1 6 0
        leave
        ret
...
$ gdb jsobj
GNU gdb (GDB) 6.8.50.20090106-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) start
Temporary breakpoint 1 at 0x804844c: file jsobj.i, line 16.
Starting program: /home/jimb/mc/b/static-call/jsobj 

Temporary breakpoint 1, main (argc=1, argv=0xbffff8a4) at jsobj.i:16
16      }
Current language:  auto; currently c++
(gdb) set $eax = 0x42424242
(gdb) print JSVAL_TO_OBJECT(0x53535353)
$1 = (struct JSObject *) 0x42424240
(gdb) quit
The program is running.  Quit anyway (and kill it)? (y or n) y
$


-- 
           Summary: GCC uses non-standard calling conventions, even with -O0
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jimb at red-bean dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/39496] GCC uses non-standard calling conventions, even with -O0
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
@ 2009-03-18 21:12 ` jimb at red-bean dot com
  2009-03-18 21:14 ` [Bug target/39496] GCC uses non-standard calling conventions for static functions " pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jimb at red-bean dot com @ 2009-03-18 21:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jimb at red-bean dot com  2009-03-18 21:11 -------
Created an attachment (id=17490)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17490&action=view)
Test case

This is the same test case used in the transcript; attached just for
convenience.


-- 


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


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

* [Bug target/39496] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
  2009-03-18 21:12 ` [Bug c++/39496] " jimb at red-bean dot com
@ 2009-03-18 21:14 ` pinskia at gcc dot gnu dot org
  2009-03-18 21:32 ` [Bug target/39496] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-03-18 21:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2009-03-18 21:14 -------
"even though the standard IA-32 calling conventions pass the
first argument on the stack"

I thought this was disabled at -O0.  At -O1 this should be enabled.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target
            Summary|GCC uses non-standard       |GCC uses non-standard
                   |calling conventions, even   |calling conventions for
                   |with -O0                    |static functions with -O0.


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


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

* [Bug target/39496] [4.2/4.3/4.4 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
  2009-03-18 21:12 ` [Bug c++/39496] " jimb at red-bean dot com
  2009-03-18 21:14 ` [Bug target/39496] GCC uses non-standard calling conventions for static functions " pinskia at gcc dot gnu dot org
@ 2009-03-18 21:32 ` rguenth at gcc dot gnu dot org
  2009-03-18 21:56 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-03-18 21:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-03-18 21:32 -------
Confirmed.  In 3.3 this worked (was probably not implemented).


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.0.4 4.3.3 4.4.0
      Known to work|                            |3.3.6
   Last reconfirmed|0000-00-00 00:00:00         |2009-03-18 21:32:10
               date|                            |
            Summary|GCC uses non-standard       |[4.2/4.3/4.4 Regression] GCC
                   |calling conventions for     |uses non-standard calling
                   |static functions with -O0.  |conventions for static
                   |                            |functions with -O0.
   Target Milestone|---                         |4.2.5
            Version|unknown                     |4.4.0


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


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

* [Bug target/39496] [4.2/4.3/4.4 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (2 preceding siblings ...)
  2009-03-18 21:32 ` [Bug target/39496] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2009-03-18 21:56 ` pinskia at gcc dot gnu dot org
  2009-03-18 21:57 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-03-18 21:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2009-03-18 21:56 -------
  /* Use register calling convention for local functions when possible.  */
  if (decl && TREE_CODE (decl) == FUNCTION_DECL
      && !profile_flag)


That should include !optimize I think.


-- 


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


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

* [Bug target/39496] [4.2/4.3/4.4 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (3 preceding siblings ...)
  2009-03-18 21:56 ` pinskia at gcc dot gnu dot org
@ 2009-03-18 21:57 ` pinskia at gcc dot gnu dot org
  2009-03-19  7:58 ` jakub at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-03-18 21:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2009-03-18 21:57 -------
We used to check flag_unit_at_a_time in this function:
  /* Use register calling convention for local functions when possible.  */
  if (decl && TREE_CODE (decl) == FUNCTION_DECL
      && flag_unit_at_a_time && !profile_flag)

Which meant it never worked for C++ in 3.4 and above , for C, it always worked
until 4.4 which removed the check.


-- 


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


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

* [Bug target/39496] [4.2/4.3/4.4 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (4 preceding siblings ...)
  2009-03-18 21:57 ` pinskia at gcc dot gnu dot org
@ 2009-03-19  7:58 ` jakub at gcc dot gnu dot org
  2009-03-19 10:26 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-19  7:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2009-03-19 07:58 -------
Created an attachment (id=17491)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17491&action=view)
gcc44-pr39496.patch

&& optimize, not !optimize.
Here is what I'm going to bootstrap/regtest.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug target/39496] [4.2/4.3/4.4 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (5 preceding siblings ...)
  2009-03-19  7:58 ` jakub at gcc dot gnu dot org
@ 2009-03-19 10:26 ` jakub at gcc dot gnu dot org
  2009-03-19 12:02 ` [Bug target/39496] [4.2/4.3 " jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-19 10:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2009-03-19 10:25 -------
Subject: Bug 39496

Author: jakub
Date: Thu Mar 19 10:25:43 2009
New Revision: 144955

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144955
Log:
        PR target/39496
        * config/i386/i386.c (ix86_function_regparm): Don't optimize local
        functions using regparm calling conventions when not optimizing.
        (ix86_function_sseregparm): Similarly for sseregparm calling
        conventions.

        * gcc.target/i386/pr39496.c: New test.
        * g++.dg/other/pr39496.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/pr39496.C
    trunk/gcc/testsuite/gcc.target/i386/pr39496.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/39496] [4.2/4.3 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (6 preceding siblings ...)
  2009-03-19 10:26 ` jakub at gcc dot gnu dot org
@ 2009-03-19 12:02 ` jakub at gcc dot gnu dot org
  2009-03-19 19:51 ` jimb at red-bean dot com
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-19 12:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2009-03-19 12:02 -------
Fixed on the trunk so far.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.0.4 4.3.3 4.4.0           |4.0.4 4.3.3
      Known to work|3.3.6                       |3.3.6 4.4.0
            Summary|[4.2/4.3/4.4 Regression] GCC|[4.2/4.3 Regression] GCC
                   |uses non-standard calling   |uses non-standard calling
                   |conventions for static      |conventions for static
                   |functions with -O0.         |functions with -O0.


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


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

* [Bug target/39496] [4.2/4.3 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (7 preceding siblings ...)
  2009-03-19 12:02 ` [Bug target/39496] [4.2/4.3 " jakub at gcc dot gnu dot org
@ 2009-03-19 19:51 ` jimb at red-bean dot com
  2009-03-31 21:11 ` [Bug target/39496] [4.3 " jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jimb at red-bean dot com @ 2009-03-19 19:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jimb at red-bean dot com  2009-03-19 19:51 -------
Fixed for me in r144969.  Thank you all!


-- 


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


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

* [Bug target/39496] [4.3 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (8 preceding siblings ...)
  2009-03-19 19:51 ` jimb at red-bean dot com
@ 2009-03-31 21:11 ` jsm28 at gcc dot gnu dot org
  2009-04-22 13:30 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 21:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jsm28 at gcc dot gnu dot org  2009-03-31 21:11 -------
Closing 4.2 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3 Regression] GCC    |[4.3 Regression] GCC uses
                   |uses non-standard calling   |non-standard calling
                   |conventions for static      |conventions for static
                   |functions with -O0.         |functions with -O0.
   Target Milestone|4.2.5                       |4.3.4


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


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

* [Bug target/39496] [4.3 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (9 preceding siblings ...)
  2009-03-31 21:11 ` [Bug target/39496] [4.3 " jsm28 at gcc dot gnu dot org
@ 2009-04-22 13:30 ` rguenth at gcc dot gnu dot org
  2009-04-22 15:02 ` rguenth at gcc dot gnu dot org
  2009-04-22 15:02 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-22 13:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2009-04-22 13:29 -------
This is worth fixing for 4.3.4.  I am testing a backport.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|jakub at gcc dot gnu dot org|rguenth at gcc dot gnu dot
                   |                            |org
           Priority|P3                          |P2


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


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

* [Bug target/39496] [4.3 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (11 preceding siblings ...)
  2009-04-22 15:02 ` rguenth at gcc dot gnu dot org
@ 2009-04-22 15:02 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-22 15:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2009-04-22 15:02 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|3.3.6 4.4.0                 |3.3.6 4.3.4 4.4.0
         Resolution|                            |FIXED


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


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

* [Bug target/39496] [4.3 Regression] GCC uses non-standard calling conventions for static functions with -O0.
  2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
                   ` (10 preceding siblings ...)
  2009-04-22 13:30 ` rguenth at gcc dot gnu dot org
@ 2009-04-22 15:02 ` rguenth at gcc dot gnu dot org
  2009-04-22 15:02 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-22 15:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from rguenth at gcc dot gnu dot org  2009-04-22 15:02 -------
Subject: Bug 39496

Author: rguenth
Date: Wed Apr 22 15:01:45 2009
New Revision: 146583

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146583
Log:
2009-04-22  Richard Guenther  <rguenther@suse.de>

        Backport from mainline:
        PR target/39496
        * config/i386/i386.c (ix86_function_regparm): Don't optimize local
        functions using regparm calling conventions when not optimizing.
        (ix86_function_sseregparm): Similarly for sseregparm calling
        conventions.

        * gcc.target/i386/pr39496.c: New test.
        * g++.dg/other/pr39496.C: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/other/pr39496.C
      - copied unchanged from r144955,
trunk/gcc/testsuite/g++.dg/other/pr39496.C
    branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr39496.c
      - copied unchanged from r144955,
trunk/gcc/testsuite/gcc.target/i386/pr39496.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/config/i386/i386.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2009-04-22 15:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-18 21:10 [Bug c++/39496] New: GCC uses non-standard calling conventions, even with -O0 jimb at red-bean dot com
2009-03-18 21:12 ` [Bug c++/39496] " jimb at red-bean dot com
2009-03-18 21:14 ` [Bug target/39496] GCC uses non-standard calling conventions for static functions " pinskia at gcc dot gnu dot org
2009-03-18 21:32 ` [Bug target/39496] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2009-03-18 21:56 ` pinskia at gcc dot gnu dot org
2009-03-18 21:57 ` pinskia at gcc dot gnu dot org
2009-03-19  7:58 ` jakub at gcc dot gnu dot org
2009-03-19 10:26 ` jakub at gcc dot gnu dot org
2009-03-19 12:02 ` [Bug target/39496] [4.2/4.3 " jakub at gcc dot gnu dot org
2009-03-19 19:51 ` jimb at red-bean dot com
2009-03-31 21:11 ` [Bug target/39496] [4.3 " jsm28 at gcc dot gnu dot org
2009-04-22 13:30 ` rguenth at gcc dot gnu dot org
2009-04-22 15:02 ` rguenth at gcc dot gnu dot org
2009-04-22 15:02 ` rguenth 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).