This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc bug: compoiler generates code that causes core dump
- To: bug-gcc at gnu dot org
- Subject: gcc bug: compoiler generates code that causes core dump
- From: david at atl-intl dot com
- Date: Sun, 25 Mar 2001 22:58:55 -0500
Folks,
Here it is, and it is the same in both the latest release (2.95.3) and
the earlier one (2.95.2).
Please do not hesitate to page me, as I will be glad to elaborate on
this bug.
David Miller
212-673-9781 (H)
888-849-3329 (B)
>// g++ -c bugtest.cpp -g -D_REENTRANT -Wno-long-long -frepo -I.
>-I/usr/include
>-pedantic
>// g++ -o bugtest bugtest.o
>#include <iostream>
>#include <typeinfo>
>int main()
>{
> std::cout << "typeid( std::cerr ).name() = " << typeid( std::cerr
> ).name()
><< std::endl ;
> std::ostream * pStrm = &std::cerr ;
> typeid( *pStrm ); // THIS LINE CAUSES A SEGMENTATION ERROR, apparently
>due to a null pointer being used in getting the type info.
> return 0 ;
>}