Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104115 - g++ 3.4.3 segmentation fault
Summary: g++ 3.4.3 segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/bugzilla/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-29 04:04 UTC by ville
Modified: 2005-12-22 01:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Preprocessed source (ccGEyxdO.out,715.83 KB, text/plain)
2005-08-29 04:06 UTC, ville
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ville 2005-08-29 04:04:14 UTC
g++ (GCC) 3.4.3-20050110 (Gentoo 3.4.3.20050110-r2, ssp-3.4.3.20050110-0,
pie-8.7.7) is unable to report that the code is invalid and crashes instead.


Reproducible: Always
Steps to Reproduce:
1. test.cpp:
#include <iostream>
#include <ostream>

template <int> struct foo;

template<>
struct foo<0> {
  typedef int t;
};

int main() {
  std::cout<< typename foo<0>::t(42);
} 

2. g++ test.cpp -o test

Actual Results:  
src/main.cpp: In function `int main()':
src/main.cpp:14: internal compiler error: Segmentation fault


Expected Results:  
The g++ should've reported that it isn't valid C++.
Comment 1 ville 2005-08-29 04:06:11 UTC
Created attachment 67157 [details]
Preprocessed source
Comment 2 Mark Loeser (RETIRED) gentoo-dev 2005-12-12 07:21:32 UTC
3.4.5 handles this error correctly.  I'll make sure the patch applies cleanly to
3.4.4 later and throw it into CVS for the next patchset.
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2005-12-22 01:01:45 UTC
The patch applies cleanly, but wrongly accepts the code.  3.4.5 and above are fixed for this issue though.