[Bug c++/25220] New: [g++] (in class) static (const integral) member initialization.

2005-12-02 Thread marcin-konarski at o2 dot pl
Linker complains about undefined reference to `symbol'
during build of the folowing code:

struct A {
  int const static a0 = 0;
  int const static a1 = 1;
};

int
main ( int argc, char ** ) {
  int a = argc ? A::a0 : A::a1;
  return ( a );
}


-- 
   Summary: [g++] (in class) static (const integral) member
initialization.
   Product: gcc
   Version: 4.0.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marcin-konarski at o2 dot pl
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu


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



[Bug c++/34972] New: ICE in write_type, at cp/mangle.c:1648

2008-01-25 Thread marcin-konarski at o2 dot pl
Presented test case produces following output:

g++ ice.cxx
ice.cxx: In member function '__typeof__ (ice::tp(tType()))
ice::foo(const tType&) const [with tType = int, function_t = bool
(*)(long int)]':
ice.cxx:9: internal compiler error: in write_type, at cp/mangle.c:1648

The test case:
ice.cxx:

template
struct ice
  {
  function_t const& CALLER;
  static function_t tp;
  ice( function_t const& func ) : CALLER( func ) { }
  template
  typeof( tp( tType() ) ) foo( tType const& value ) const
{ return ( CALLER( value ) ); }
  };

bool iceh( int long a )
  {
  return ( a > 1 );
  }

int main( int, char** )
  {
  return ( ice( &iceh ).foo( 3 ) ? 7 : 13 ) ;
  }


-- 
   Summary: ICE in write_type, at cp/mangle.c:1648
   Product: gcc
   Version: 4.2.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: marcin-konarski at o2 dot pl
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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