public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this”
@ 2003-06-26 10:59 Vyatcheslav dot Sysoltsev at intel dot com
  2003-06-26 12:11 ` [Bug c++/11326] " schwab at suse dot de
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Vyatcheslav dot Sysoltsev at intel dot com @ 2003-06-26 10:59 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3275 bytes --]

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

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

           Summary: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary
                    return value is implicit first parameter preceding
                    “this”
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Vyatcheslav dot Sysoltsev at intel dot com
                CC: gcc-bugs at gcc dot gnu dot org

According to C++ Itanium ABI (http://www.codesourcery.com/cxx-
abi/abi.html#calls) clause 3.1.4 if the return value type has a non-trivial 
copy constructor or destructor the caller allocates space for a temporary, and 
passes a pointer to the temporary as an implicit first parameter preceding both 
the “this” parameter and user parameters. The callee then constructs the return 
value into this temporary.
	I tried gcc 3.2 on United Linux 1.0 and found that this rule is 
violated, “this” pointer is always r32 and the value returned in different ways 
but never the way described in this part of ABI.
	Here is a test case that demonstrates the problem:
test.cc:
#include <stdio.h>
#include <stdlib.h>

struct ConstructedObject {
    ConstructedObject() {};
    ~ConstructedObject() {};
    ConstructedObject(const ConstructedObject &from) {};
};

struct FrameworkObject {
    ConstructedObject action();
};

ConstructedObject FrameworkObject::action() {
    void *r32, *r33;

    asm("mov %0 = r32\nmov %1 = r33" : "=r"(r32), "=r"(r33) : );
    printf("In FrameworkObject, this = %lx, r32 = %lx, r33 = %lx\n", this, r32, 
r33);
    if (this != r33) {
        printf ("Test failed\n");
        exit(-1);
    }
};

int main()
{
    FrameworkObject slawa;
    slawa.action();
    return 0;
}

command line: g++ -g -O0 test.cc && a.out
Output:
In FrameworkObject, this = 60000fffffffb270, r32 = 60000fffffffb270, r33 = 
6000000000000de0
Test failed

Test fails because according to ABI r32 is a placeholder for returned object, 
r33 is “this” pointer.
Because gcc violates C++ Itanium ABI such way, binaries built by gcc can be 
incompatible with binaries built by other compiler. To avoid such a situation 
C++ ABI standard was created. All compilers must honor it, gcc must in greater 
degree as the most popular one, that's why I set P1 priority.

The bug is reproducible both with gcc 3.2 and gcc 3.4.
/usr/bin/g++ -v
Reading specs from /usr/lib/gcc-lib/ia64-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-
prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --
libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --enable-libgcj --
with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --
enable-shared --enable-__cxa_atexit ia64-suse-linux
Thread model: posix
gcc version 3.2

/mnt/scratch/compiler/gcc-3.4-IA64/usr/local/bin/g++ -v
Reading specs from /mnt/scratch/compiler/gcc-3.4-IA64/usr/local/bin/../lib/gcc-
lib/ia64-unknown-linux-gnu/3.4/specs
Configured with: ./configure
Thread model: posix
gcc version 3.4 20030603 (experimental)


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this”
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
@ 2003-06-26 12:11 ` schwab at suse dot de
  2003-08-07  3:34 ` [Bug c++/11326] [ABI] " pinskia at physics dot uc dot edu
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: schwab at suse dot de @ 2003-06-26 12: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=11326


schwab at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schwab at suse dot de


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

* [Bug c++/11326] [ABI] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this”
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
  2003-06-26 12:11 ` [Bug c++/11326] " schwab at suse dot de
@ 2003-08-07  3:34 ` pinskia at physics dot uc dot edu
  2003-08-11 16:19 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-07  3:34 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

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

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
            Summary|C++ IA64 ABI: 3.1.4:        |[ABI] C++ IA64 ABI: 3.1.4:
                   |sometimes pointer to        |sometimes pointer to
                   |temporary return value is   |temporary return value is
                   |implicit first parameter    |implicit first parameter
                   |preceding “this”            |preceding “this”


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-07 03:34 -------
Does this happen on the mainline with -fabi-version=0?


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

* [Bug c++/11326] [ABI] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this”
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
  2003-06-26 12:11 ` [Bug c++/11326] " schwab at suse dot de
  2003-08-07  3:34 ` [Bug c++/11326] [ABI] " pinskia at physics dot uc dot edu
@ 2003-08-11 16:19 ` pinskia at gcc dot gnu dot org
  2003-08-11 17:58 ` schwab at suse dot de
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-11 16:19 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=11326


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-11 16:19 -------
These should not be in waiting but it would be nice to know if they are fixed with the 
mainline with -fabi-version=0?


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

* [Bug c++/11326] [ABI] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this”
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (2 preceding siblings ...)
  2003-08-11 16:19 ` pinskia at gcc dot gnu dot org
@ 2003-08-11 17:58 ` schwab at suse dot de
  2003-08-24 16:35 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: schwab at suse dot de @ 2003-08-11 17:58 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=11326



------- Additional Comments From schwab at suse dot de  2003-08-11 17:58 -------
Mainline with -fabi-version=0 behaves the same.


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

* [Bug c++/11326] [ABI] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this”
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (3 preceding siblings ...)
  2003-08-11 17:58 ` schwab at suse dot de
@ 2003-08-24 16:35 ` pinskia at gcc dot gnu dot org
  2003-10-21 16:24 ` nathan at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-24 16:35 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=11326


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |---


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

* [Bug c++/11326] [ABI] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this”
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (4 preceding siblings ...)
  2003-08-24 16:35 ` pinskia at gcc dot gnu dot org
@ 2003-10-21 16:24 ` nathan at gcc dot gnu dot org
  2004-01-15 22:15 ` [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this" steven at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-10-21 16:24 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=11326


nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
   Target Milestone|---                         |3.4


------- Additional Comments From nathan at gcc dot gnu dot org  2003-10-21 16:24 -------
upping severity as this is a significant interoperability issue
set target milestone to 3.4


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (5 preceding siblings ...)
  2003-10-21 16:24 ` nathan at gcc dot gnu dot org
@ 2004-01-15 22:15 ` steven at gcc dot gnu dot org
  2004-02-12 18:19 ` giovannibajo at libero dot it
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-15 22:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-01-15 22:15 -------
This is not target dependent, but affects c++ on all machines. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |c++


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (6 preceding siblings ...)
  2004-01-15 22:15 ` [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this" steven at gcc dot gnu dot org
@ 2004-02-12 18:19 ` giovannibajo at libero dot it
  2004-02-12 18:28 ` giovannibajo at libero dot it
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-12 18:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-12 18:19 -------
Is this a regression? There is no indication if it was tested on 2.95. I know 
the ABI is changed, but if the program succeeds, it's still a regression wrt 
the old ABI.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at libero dot
                   |                            |it


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (7 preceding siblings ...)
  2004-02-12 18:19 ` giovannibajo at libero dot it
@ 2004-02-12 18:28 ` giovannibajo at libero dot it
  2004-02-16  5:52 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-12 18:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-12 18:28 -------
Ah sorry, I didn't notice the program just tests Itanium ABI compliance.

-- 


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (8 preceding siblings ...)
  2004-02-12 18:28 ` giovannibajo at libero dot it
@ 2004-02-16  5:52 ` mmitchel at gcc dot gnu dot org
  2004-02-17 18:33 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-16  5:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (9 preceding siblings ...)
  2004-02-16  5:52 ` mmitchel at gcc dot gnu dot org
@ 2004-02-17 18:33 ` cvs-commit at gcc dot gnu dot org
  2004-02-18  0:09 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-17 18:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-17 18:32 -------
Subject: Bug 11326

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-02-17 18:32:45

Modified files:
	gcc            : ChangeLog c-common.c c-common.h c-opts.c c.opt 
	                 calls.c common.opt flags.h opts.c toplev.c 
	gcc/config/ia64: ia64.c 
	gcc/cp         : ChangeLog cp-tree.h mangle.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/abi: structret1.C 

Log message:
	PR c++/11326
	* c-common.c (flag_abi_version): Remove.
	* c-common.h (flag_abi_version): Likewise.
	* c-opts.c (c_common_handle_option): Remove OPT_fabi_version case.
	* c.opt (fabi-version): Remove.
	* calls.c (expand_call): Always pass a function type to
	struct_value_rtx.  Use convert_memory_address.
	* common.opt (fabi-version): Add it.
	* flags.h (flag_abi_version): Likewise.
	(abi_version_at_least): New macro.
	* opts.c (common_handle_option): Add OPT_fabi_version.
	* toplev.c (flag_abi_version): Define it.
	* config/ia64/ia64.c (ia64_struct_retval_addr_is_first_parm_p):
	New function.
	(ia64_output_mi_thunk): Use it.
	(ia64_struct_value_rtx): Likewise.
	
	PR c++/11326
	* cp-tree.h (abi_version_at_least): Remove.
	* mangle.c: Include flags.h.
	
	PR c++/11326
	* g++.dg/abi/structret1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.2797&r2=2.2798
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.483&r2=1.484
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.h.diff?cvsroot=gcc&r1=1.221&r2=1.222
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-opts.c.diff?cvsroot=gcc&r1=1.102&r2=1.103
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c.opt.diff?cvsroot=gcc&r1=1.18&r2=1.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&r1=1.319&r2=1.320
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/common.opt.diff?cvsroot=gcc&r1=1.26&r2=1.27
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flags.h.diff?cvsroot=gcc&r1=1.129&r2=1.130
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/opts.c.diff?cvsroot=gcc&r1=1.54&r2=1.55
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&r1=1.877&r2=1.878
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.c.diff?cvsroot=gcc&r1=1.275&r2=1.276
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3958&r2=1.3959
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.953&r2=1.954
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/mangle.c.diff?cvsroot=gcc&r1=1.97&r2=1.98
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3509&r2=1.3510
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/abi/structret1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (10 preceding siblings ...)
  2004-02-17 18:33 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-18  0:09 ` cvs-commit at gcc dot gnu dot org
  2004-02-18  0:11 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-18  0:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-18 00:09 -------
Subject: Bug 11326

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-02-18 00:09:08

Modified files:
	gcc            : ChangeLog c-common.c c-common.h c-opts.c c.opt 
	                 calls.c common.opt flags.h opts.c toplev.c 
	gcc/config/ia64: ia64.c ia64.h 
	gcc/cp         : ChangeLog cp-tree.h mangle.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/abi: structret1.C 

Log message:
	PR c++/11326
	* c-common.c (flag_abi_version): Remove.
	* c-common.h (flag_abi_version): Likewise.
	* c-opts.c (c_common_handle_option): Remove OPT_fabi_version case.
	* c.opt (fabi-version): Remove.
	* calls.c (expand_call): Always pass a function type to
	struct_value_rtx.  Use convert_memory_address.
	* common.opt (fabi-version): Add it.
	* flags.h (flag_abi_version): Likewise.
	(abi_version_at_least): New macro.
	* opts.c (common_handle_option): Add OPT_fabi_version.
	* toplev.c (flag_abi_version): Define it.
	* config/ia64/ia64.h (STRUCT_VALUE_REGNUM): Remove.
	* config/ia64/ia64.c (TARGET_STRUCT_VALUE_RTX): Define it.
	(ia64_struct_retval_addr_is_first_parm_p):
	New function.
	(ia64_output_mi_thunk): Use it.
	(ia64_struct_value_rtx): New function.
	
	PR c++/11326
	* cp-tree.h (abi_version_at_least): Remove.
	* mangle.c: Include flags.h.
	
	PR c++/11326
	* g++.dg/abi/structret1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.210&r2=2.2326.2.211
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.476.4.4&r2=1.476.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.216.2.3&r2=1.216.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-opts.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.96.4.6&r2=1.96.4.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c.opt.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.17.12.1&r2=1.17.12.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.315.2.2&r2=1.315.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/common.opt.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.24&r2=1.24.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flags.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.127&r2=1.127.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/opts.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.51.4.2&r2=1.51.4.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.863.4.8&r2=1.863.4.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.265.2.2&r2=1.265.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.163&r2=1.163.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.54&r2=1.3892.2.55
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.946.4.5&r2=1.946.4.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/mangle.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.95.2.2&r2=1.95.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.87&r2=1.3389.2.88
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/abi/structret1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (11 preceding siblings ...)
  2004-02-18  0:09 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-18  0:11 ` mmitchel at gcc dot gnu dot org
  2004-02-18 10:33 ` schwab at suse dot de
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-18  0:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-02-18 00:11 -------
Fixed in GCC 3.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (12 preceding siblings ...)
  2004-02-18  0:11 ` mmitchel at gcc dot gnu dot org
@ 2004-02-18 10:33 ` schwab at suse dot de
  2004-02-18 14:21 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: schwab at suse dot de @ 2004-02-18 10:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-02-18 10:33 -------
Breaks ia64-linux, see 
<http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01603.html>. 

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


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (13 preceding siblings ...)
  2004-02-18 10:33 ` schwab at suse dot de
@ 2004-02-18 14:21 ` cvs-commit at gcc dot gnu dot org
  2004-02-18 14:22 ` cvs-commit at gcc dot gnu dot org
  2004-02-18 14:48 ` schwab at suse dot de
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-18 14:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-18 14:21 -------
Subject: Bug 11326

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	schwab@gcc.gnu.org	2004-02-18 14:21:14

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: ia64.c 

Log message:
	PR c++/11326
	* config/ia64/ia64.c (ia64_struct_value_rtx): Cope with NULL
	fntype.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.2821&r2=2.2822
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.c.diff?cvsroot=gcc&r1=1.276&r2=1.277



-- 


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (14 preceding siblings ...)
  2004-02-18 14:21 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-18 14:22 ` cvs-commit at gcc dot gnu dot org
  2004-02-18 14:48 ` schwab at suse dot de
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-18 14:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-18 14:22 -------
Subject: Bug 11326

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	schwab@gcc.gnu.org	2004-02-18 14:22:44

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: ia64.c 

Log message:
	PR c++/11326
	* config/ia64/ia64.c (ia64_struct_value_rtx): Cope with NULL
	fntype.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.212&r2=2.2326.2.213
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/ia64.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.265.2.3&r2=1.265.2.4



-- 


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


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

* [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this"
  2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
                   ` (15 preceding siblings ...)
  2004-02-18 14:22 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-18 14:48 ` schwab at suse dot de
  16 siblings, 0 replies; 18+ messages in thread
From: schwab at suse dot de @ 2004-02-18 14:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-02-18 14:48 -------
Now fixed for real. 

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


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


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

end of thread, other threads:[~2004-02-18 14:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26 10:59 [Bug c++/11326] New: C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding “this” Vyatcheslav dot Sysoltsev at intel dot com
2003-06-26 12:11 ` [Bug c++/11326] " schwab at suse dot de
2003-08-07  3:34 ` [Bug c++/11326] [ABI] " pinskia at physics dot uc dot edu
2003-08-11 16:19 ` pinskia at gcc dot gnu dot org
2003-08-11 17:58 ` schwab at suse dot de
2003-08-24 16:35 ` pinskia at gcc dot gnu dot org
2003-10-21 16:24 ` nathan at gcc dot gnu dot org
2004-01-15 22:15 ` [Bug c++/11326] C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this" steven at gcc dot gnu dot org
2004-02-12 18:19 ` giovannibajo at libero dot it
2004-02-12 18:28 ` giovannibajo at libero dot it
2004-02-16  5:52 ` mmitchel at gcc dot gnu dot org
2004-02-17 18:33 ` cvs-commit at gcc dot gnu dot org
2004-02-18  0:09 ` cvs-commit at gcc dot gnu dot org
2004-02-18  0:11 ` mmitchel at gcc dot gnu dot org
2004-02-18 10:33 ` schwab at suse dot de
2004-02-18 14:21 ` cvs-commit at gcc dot gnu dot org
2004-02-18 14:22 ` cvs-commit at gcc dot gnu dot org
2004-02-18 14:48 ` schwab at suse dot de

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