This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13389] New: sizeof in template argument causes segmentation fault
- From: "heinlein at informatik dot uni-ulm dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Dec 2003 13:55:01 -0000
- Subject: [Bug c++/13389] New: sizeof in template argument causes segmentation fault
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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);
}
--
Summary: sizeof in template argument causes segmentation fault
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: heinlein at informatik dot uni-ulm dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13389