c++/8384: g++ -g gives ICE, but compiles ok without -g

wb@fnal.gov wb@fnal.gov
Mon Oct 28 09:39:00 GMT 2002

>Number:         8384
>Category:       c++
>Synopsis:       g++ -g  gives ICE, but compiles ok without -g
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 28 09:16:00 PST 2002
>Originator:     Walter E. Brown
>Release:        gcc v3.2
The following short program gives an internal compiler error with v3.2 when compiled with -g, but compiles correctly when -g flag is not used.

// ----------

template< class T >
T  fakemake();

template< class T >
struct Identity  {
  typedef  T  type;

template< class T, class U>
struct Result
  : public Identity< typeof( true ? fakemake<T>() : fakemake<U>() )>

int main ()  {

  Result<short,int>::type  i = 0;
  return i;




More information about the Gcc-bugs mailing list