Bug 24967 - ICE with misplaced typename
Summary: ICE with misplaced typename
Status: RESOLVED DUPLICATE of bug 19253
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-21 08:14 UTC by Christoph Pesch
Modified: 2005-11-21 15:56 UTC (History)
5 users (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Pesch 2005-11-21 08:14:09 UTC
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:
pesch@kstbu027[~/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
Comment 1 Andrew Pinski 2005-11-21 15:56:49 UTC
This is a dup of bug 19253 which is fixed in 3.4.5, and 4.0.3. That might be why you did not find the bug.

*** This bug has been marked as a duplicate of 19253 ***