Hi,

my latest typo (a typename in the return statement of a template 
function) caused an internal compiler error with gcc 4.0.2 and 
gcc 3.4.3. (No ICE with gcc 3.3.4).

#include <utility>

template<typename It> typename std::pair<It,double>
test(It it)
{
  return typename std::pair<It,double>(it, 0.0); // ICE
  // return std::pair<It,double>(it, 0.0);       // no ICE
}


Output of gcc:
[EMAIL PROTECTED]/src/c++/test]214: g++ -c ice.cpp
ice.cpp: In function 'std::pair<It, double> test(It)':
ice.cpp:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


I hope this is not a duplicate of an allready existing
bug report. (In the past I was not very successfully in
searching for known bugs).

Best regards and thanks for all the great work on gcc,
Christoph


-- 
           Summary: ICE with misplaced typename
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: christoph dot pesch at siemens dot com
  GCC host triplet: i686-pc-linux-gnu


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

Reply via email to