Bug 50112 - g++ segmentation fault when handling "continue" with "-O2" option in a dead loop
Summary: g++ segmentation fault when handling "continue" with "-O2" option in a dead loop
Status: RESOLVED DUPLICATE of bug 48600
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.6.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-debug
Depends on:
Blocks:
 
Reported: 2011-08-18 05:44 UTC by billybob
Modified: 2011-08-18 06:06 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description billybob 2011-08-18 05:44:27 UTC
------ Testcase: example.cpp -----------
#include <iostream>
using namespace std;
void f()
{
    while(1)
    {
        string a="oh";
        cout << a << endl;
        continue;
    }
}
int main(int argc, char** argv)
{
    return 0;
}

---------------Detail--------------------
% g++ -Wall -O2 -o example example.cpp 

g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
-----------------------------------------
% g++ -v

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.6.1/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /build/src/gcc-4.6.1/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --disable-multilib --disable-libstdcxx-pch --enable-checking=release
Thread model: posix
gcc version 4.6.1 (GCC) 



(And This bug will not occur without the "-O2" option)
Comment 1 Jakub Jelinek 2011-08-18 06:06:09 UTC
Dup of PR48600.

*** This bug has been marked as a duplicate of bug 48600 ***