c++/9708: Core dump from compiler
bangerth@dealii.org
bangerth@dealii.org
Fri Feb 14 22:01:00 GMT 2003
Synopsis: Core dump from compiler
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Feb 14 22:01:55 2003
State-Changed-Why:
Reduced, this code looks like this:
---------------------------
template <unsigned int N>
char* begin(char (&a) [N] );
template <unsigned int N>
unsigned int size(char (&) [N] );
void foo(char *);
void bar()
{
char s[] = { 'a', 'b', 'c' } ;
char d[ size( s ) ] ;
foo(begin(d)) ;
}
----------------------------
This ICEs all compilers since at least 2.95. 3.4 presently
gives this message:
tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc
y.cc: In function `char* begin(char (&)[N])':
y.cc:2: error: variable-size type declared outside of any function
y.cc: In function `void bar()':
y.cc:13: internal compiler error: Segmentation fault
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9708
More information about the Gcc-bugs
mailing list