[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

foo = std::pair(1,3) triggers internal compiler error



Hi,

The following program (with a syntax error) gives "internal compiler
error" rather than a syntax error message.  A bzipped ".ii" file is
attached.

-Steve

P.S. The page www.gnu.org/software/gcc/gnats.html mentions "gccbug"
as the preferred method, but I don't find that program on my system.



#include <utility>


int main( int ac, char* av[] )
{
    std::pair<int,int> foo;

    foo = std::pair(1,3);
}


steve@riemann{gcc-2.95.4}g++ -v -save-temps -Wall badpair.cc 
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20010506 (Debian prerelease)
 /usr/lib/gcc-lib/i386-linux/2.95.4/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Wall -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ badpair.cc badpair.ii
GNU CPP version 2.95.4 20010506 (Debian prerelease) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3
 /usr/local/include
 /usr/lib/gcc-lib/i386-linux/2.95.4/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/lib/gcc-lib/i386-linux/2.95.4/../../../../i386-linux/include
End of omitted list.
 /usr/lib/gcc-lib/i386-linux/2.95.4/cc1plus badpair.ii -quiet -dumpbase badpair.cc -Wall -version -o badpair.s
GNU C++ version 2.95.4 20010506 (Debian prerelease) (i386-linux) compiled by GNU C version 2.95.4 20010506 (Debian prerelease).
badpair.cc: In function `int main(int, char **)':
badpair.cc:8: Internal compiler error.
badpair.cc:8: Please submit a full bug report.
badpair.cc:8: Internal compiler error:
badpair.cc:8: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.




-- 
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants

Attachment: badpair.ii.bz2
Description: Binary data


Reply to: