This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc bug: compoiler generates code that causes core dump


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 ;
>}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]