From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6761 invoked by alias); 18 Sep 2015 07:16:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6698 invoked by uid 48); 18 Sep 2015 07:16:00 -0000 From: "su at cs dot ucdavis.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67619] New: ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode, at stor-layout.c:425 Date: Fri, 18 Sep 2015 07:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: su at cs dot ucdavis.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg01460.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67619 Bug ID: 67619 Summary: ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode, at stor-layout.c:425 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu Target Milestone: --- The following code causes an ICE when compiled with the current gcc trunk at -O1 and above on x86_64-linux-gnu in both 32-bit and 64-bit modes. It also affects 4.6.x through 5.2.x:=20 (1) hang: 4.6.x and 4.7.x=20 (2) ICE: 4.8.x to 5.2.x=20 $ gcc-trunk -v Using built-in specs. COLLECT_GCC=3Dgcc-trunk COLLECT_LTO_WRAPPER=3D/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/= 6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --prefix=3D/usr/local/gcc-trunk --enable-languages=3Dc,c++ --disable-werror --enable-multilib Thread model: posix gcc version 6.0.0 20150917 (experimental) [trunk revision 227862] (GCC)=20 $=20 $ gcc-trunk -O0 -c small.c $=20 $ gcc-trunk -O1 -c small.c small.c: In function =E2=80=98foo=E2=80=99: small.c:9:3: internal compiler error: in int_mode_for_mode, at stor-layout.c:425 __builtin_eh_return (l, p); ^ 0xa9f22b int_mode_for_mode(machine_mode) ../../gcc-trunk/gcc/stor-layout.c:425 0x7ec67e emit_move_via_integer ../../gcc-trunk/gcc/expr.c:3143 0x7f8d9a emit_move_insn_1(rtx_def*, rtx_def*) ../../gcc-trunk/gcc/expr.c:3524 0x7f90d4 emit_move_insn(rtx_def*, rtx_def*) ../../gcc-trunk/gcc/expr.c:3592 0x7dcae2 copy_to_reg(rtx_def*) ../../gcc-trunk/gcc/explow.c:578 0x7d558f expand_builtin_eh_return(tree_node*, tree_node*) ../../gcc-trunk/gcc/except.c:2222 0x6d48f4 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc-trunk/gcc/builtins.c:6450 0x7f46d2 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc-trunk/gcc/expr.c:10473 0x6f54a3 expand_expr ../../gcc-trunk/gcc/expr.h:255 0x6f54a3 expand_call_stmt ../../gcc-trunk/gcc/cfgexpand.c:2647 0x6f54a3 expand_gimple_stmt_1 ../../gcc-trunk/gcc/cfgexpand.c:3534 0x6f54a3 expand_gimple_stmt ../../gcc-trunk/gcc/cfgexpand.c:3697 0x6f6b9a expand_gimple_basic_block ../../gcc-trunk/gcc/cfgexpand.c:5700 0x6fda46 execute ../../gcc-trunk/gcc/cfgexpand.c:6286 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $=20 -------------------------------- void foo () { unsigned long l; void *p =3D 0;=20 __builtin_unwind_init (); l =3D 0;=20 __builtin_eh_return (l, p); } >>From gcc-bugs-return-497483-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 18 07:27:30 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 37402 invoked by alias); 18 Sep 2015 07:27:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 37383 invoked by uid 48); 18 Sep 2015 07:27:24 -0000 From: "cctsai57 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/67620] New: _GLIBCXX_USE_CXX11_ABI=1 fails to catch ios_base::failure Date: Fri, 18 Sep 2015 07:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cctsai57 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg01461.txt.bz2 Content-length: 1518 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67620 Bug ID: 67620 Summary: _GLIBCXX_USE_CXX11_ABI=1 fails to catch ios_base::failure Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: cctsai57 at gmail dot com Target Milestone: --- #include #include #include using namespace std; int main() { ifstream f; f.exceptions(ifstream::failbit); try { f.open("file_does_not_exit");// throw ios_base::failure } catch (const ios_base::failure &iof) { // g++ -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=0 cout << "typeid(iof) : " << typeid(iof).name() << '\n'; } catch (const exception &ex) { // g++ -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=1. Bug? Why? cout << "typeid(ex) : " << typeid(ex).name() << '\n'; } } $ g++ -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=0 a.cpp -static && ./a.out typeid(iof) : NSt8ios_base7failureE $ g++ -std=gnu++11 -D_GLIBCXX_USE_CXX11_ABI=1 a.cpp -static && ./a.out typeid(ex) : NSt8ios_base7failureE Description: Let `f.open()' throw `ios_base::failure'. If compiled with -D_GLIBCXX_USE_CXX11_ABI=1, the above code fails to catch `ios_base::failure', but `exception' insead. gcc version: gcc version 5.2.1 20150917 (GCC) gcc version 6.0.0 20150917 (experimental) (GCC)