c++/9912: g++ segfaults when defining a method inline in a local definition of a non-locally declared type
danb@cs.utexas.edu
danb@cs.utexas.edu
Mon Mar 3 04:46:00 GMT 2003
>Number: 9912
>Category: c++
>Synopsis: g++ segfaults when defining a method inline in a local definition of a non-locally declared type
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Mon Mar 03 04:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Daniel Brown
>Release: 3.2.2
>Organization:
>Environment:
Linux 2.4.18 i686 AMD Athlon(tm) ProcessorAuthenticAMD GNU/Linux
>Description:
// code
struct A;
int main() {
struct ::A {
A() {}
};
return 0;
}
// end code
when this is compiled with:
$ g++ main.cpp
the following error is given:
main.cpp: In constructor `A::A()':
main.cpp:6: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
whereas the following compiles fine:
// code
struct A;
int main() {
struct ::A {
A();
};
return 0;
}
// end code
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list