Bug 13389 - sizeof in template:unimplemented: call_expr cannot be mangled due to a defect in the C++ ABI
Summary: sizeof in template:unimplemented: call_expr cannot be mangled due to a defect...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.2
: P2 normal
Target Milestone: ---
Assignee: Jason Merrill
URL:
Keywords: ABI, ice-on-valid-code, rejects-valid
Depends on:
Blocks:
 
Reported: 2003-12-12 13:54 UTC by Christian Heinlein
Modified: 2009-04-09 20:29 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-03-03 21:49:18


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Heinlein 2003-12-12 13:54:59 UTC
ixtys$ uname -a
Linux ixtys 2.2.18 #1 Fri Jan 19 22:10:35 GMT 2001 i686 unknown
ixtys$ g++ -v
Reading specs from
/home/heinlein/soft/GCC/3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/home/heinlein/soft/GCC/3.2
Thread model: posix
gcc version 3.2
ixtys$ g++ -c bug.cxx -save-temps
bug.cxx: In function `int main()':
bug.cxx:13: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
ixtys$ cat bug.ii
# 1 "bug.cxx"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "bug.cxx"
template <int i>
struct X {
    typedef int Z;
};

template <typename T>
T f (T) {}

template <typename T>
void g (T, typename X<sizeof f(T())>::Z) {}

int main () {
    g(1, 2);
}
Comment 1 Wolfgang Bangerth 2003-12-12 14:27:53 UTC
Confirmed, somehow: this presently gives these error messages: 
 
g/x> /home/bangerth/bin/gcc-3.3.3-pre/bin/c++ -c x.cc 
x.cc:13: sorry, unimplemented: call_expr cannot be mangled due to a defect in  
   the C++ ABI 
 
And the same with mainline, even with -fabi-version=0. I don't know  
whether this still qualifies as a bug proper, but since it's not 
implemented we should keep it open. 
 
W. 
Comment 2 Giovanni Bajo 2003-12-16 19:01:06 UTC
I think we should just wait for the Itanium ABI commitee to update its ABI. See 
also this thread: http://gcc.gnu.org/ml/gcc/2003-06/msg01948.html

especially:
http://gcc.gnu.org/ml/gcc/2003-06/msg02018.html
http://gcc.gnu.org/ml/gcc/2003-06/msg02025.html

Mark, are there any news on this issue?
Comment 3 Andrew Pinski 2003-12-16 19:05:06 UTC
Should not be in waiting but suspended.
Comment 4 Giovanni Bajo 2004-01-11 12:03:47 UTC
Not an enhancemente: it's an ICE on a valid piece of C++ code.
Comment 5 Jason Merrill 2009-03-03 21:49:18 UTC
Taking mangling issues.
Comment 6 Jason Merrill 2009-04-09 20:29:26 UTC
Fixed.