From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4895 invoked by alias); 22 Mar 2012 22:14:07 -0000 Received: (qmail 4865 invoked by uid 22791); 22 Mar 2012 22:14:04 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Mar 2012 22:13:49 +0000 From: "adrian at llnl dot gov" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/52679] New: ICE in gfortran 4.6.3, x86_64 Date: Thu, 22 Mar 2012 22:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: blocker X-Bugzilla-Who: adrian at llnl dot gov X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 X-SW-Source: 2012-03/txt/msg01982.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52679 Bug #: 52679 Summary: ICE in gfortran 4.6.3, x86_64 Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: adrian@llnl.gov Created attachment 26962 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D26962 reduced test case Here's another one :-) The raw testcase is the same as Bug 52622, but it was reduced to yield a different segfault this time. ICE in gfortran 4.6.3 . The machine is running Ubuntu 10.04, 64 bit on an Intel Xeon. $ gfortran -c -o test.o test.f03=20 f951: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. I've attached a delta-reduced test case. This is the valgrind output: =3D=3D6154=3D=3D Invalid read of size 1 =3D=3D6154=3D=3D at 0x5F8B3E: mpz_get_double_int (double-int.c:1145) =3D=3D6154=3D=3D by 0x554001: gfc_conv_mpz_to_tree (trans-const.c:204) =3D=3D6154=3D=3D by 0x55480F: gfc_conv_constant (trans-const.c:396) =3D=3D6154=3D=3D by 0x568EBB: gfc_conv_initializer (trans-expr.c:4162) =3D=3D6154=3D=3D by 0x56139B: gfc_conv_structure (trans-expr.c:4671) =3D=3D6154=3D=3D by 0x568FAB: gfc_conv_initializer (trans-expr.c:4204) =3D=3D6154=3D=3D by 0x56139B: gfc_conv_structure (trans-expr.c:4671) =3D=3D6154=3D=3D by 0x568FAB: gfc_conv_initializer (trans-expr.c:4204) =3D=3D6154=3D=3D by 0x558180: gfc_get_symbol_decl (trans-decl.c:1381) =3D=3D6154=3D=3D by 0x55878F: generate_local_decl (trans-decl.c:4179) =3D=3D6154=3D=3D by 0x52F5E6: traverse_ns (symbol.c:3333) =3D=3D6154=3D=3D by 0x52F5D5: traverse_ns (symbol.c:3330) =3D=3D6154=3D=3D Address 0x2 is not stack'd, malloc'd or (recently) free'd =3D=3D6154=3D=3D=20 test.f03: In function =E2=80=98args_basic_wrap=E2=80=99: test.f03:31:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. =3D=3D6154=3D=3D=20 =3D=3D6154=3D=3D HEAP SUMMARY: =3D=3D6154=3D=3D in use at exit: 865,260 bytes in 3,348 blocks =3D=3D6154=3D=3D total heap usage: 7,483 allocs, 4,135 frees, 1,552,569 b= ytes allocated =3D=3D6154=3D=3D=20 =3D=3D6154=3D=3D LEAK SUMMARY: =3D=3D6154=3D=3D definitely lost: 12,294 bytes in 73 blocks =3D=3D6154=3D=3D indirectly lost: 3,504 bytes in 6 blocks =3D=3D6154=3D=3D possibly lost: 352 bytes in 18 blocks =3D=3D6154=3D=3D still reachable: 849,110 bytes in 3,251 blocks =3D=3D6154=3D=3D suppressed: 0 bytes in 0 blocks =3D=3D6154=3D=3D Rerun with --leak-check=3Dfull to see details of leaked me= mory =3D=3D6154=3D=3D=20 =3D=3D6154=3D=3D For counts of detected and suppressed errors, rerun with: = -v =3D=3D6154=3D=3D ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 fro= m 4) =3D=3D6138=3D=3D=20 =3D=3D6138=3D=3D HEAP SUMMARY: =3D=3D6138=3D=3D in use at exit: 32,121 bytes in 82 blocks =3D=3D6138=3D=3D total heap usage: 498 allocs, 416 frees, 60,580 bytes al= located =3D=3D6138=3D=3D=20 =3D=3D6138=3D=3D LEAK SUMMARY: =3D=3D6138=3D=3D definitely lost: 5,444 bytes in 29 blocks =3D=3D6138=3D=3D indirectly lost: 45 bytes in 3 blocks =3D=3D6138=3D=3D possibly lost: 29 bytes in 2 blocks =3D=3D6138=3D=3D still reachable: 26,603 bytes in 48 blocks =3D=3D6138=3D=3D suppressed: 0 bytes in 0 blocks =3D=3D6138=3D=3D Rerun with --leak-check=3Dfull to see details of leaked me= mory =3D=3D6138=3D=3D=20 =3D=3D6138=3D=3D For counts of detected and suppressed errors, rerun with: = -v =3D=3D6138=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 fro= m 4) Backtrace in gdb: Program received signal SIGSEGV, Segmentation fault. mpz_get_double_int (type=3D0x0, val=3D0x136b528, wrap=3D1 '\001') at ../../gcc/double-int.c:1145 1145 res =3D double_int_ext (res, TYPE_PRECISION (type), TYPE_UNSIGNED (type)); (gdb) l 1140 gcc_assert (wrap || count <=3D 2); 1141=20=20=20=20 1142 res.low =3D vp[0]; 1143 res.high =3D (HOST_WIDE_INT) vp[1]; 1144=20=20=20=20 1145 res =3D double_int_ext (res, TYPE_PRECISION (type), TYPE_UNSIGNED (type)); 1146 if (mpz_sgn (val) < 0) 1147 res =3D double_int_neg (res); 1148=20=20=20=20 1149 return res; (gdb) bt #0 mpz_get_double_int (type=3D0x0, val=3D0x136b528, wrap=3D1 '\001') at ../../gcc/double-int.c:1145 #1 0x0000000000554002 in gfc_conv_mpz_to_tree (i=3D0x136b528, kind=3D0) at ../../gcc/fortran/trans-const.c:204 #2 0x0000000000554810 in gfc_conv_constant (se=3D0x7fffffffd870, expr=3D0x= 136b4b0) at ../../gcc/fortran/trans-const.c:396 #3 0x0000000000568ebc in gfc_conv_initializer (expr=3D0x136b4b0, ts=3D0x13= 7d008, type=3D0x7ffff7e9cdc8, array=3D, pointer=3D,=20 procptr=3D) at ../../gcc/fortran/trans-expr.c:4162 #4 0x000000000056139c in gfc_conv_structure (se=3D0x7fffffffd940, expr=3D<= value optimized out>, init=3D) at ../../gcc/fortran/trans-expr.c:4671 #5 0x0000000000568fac in gfc_conv_initializer (expr=3D0x135c830, ts=3D0x13= 75de8, type=3D0x7ffff7f85bd0, array=3D, pointer=3D,=20 procptr=3D) at ../../gcc/fortran/trans-expr.c:4204 #6 0x000000000056139c in gfc_conv_structure (se=3D0x7fffffffda10, expr=3D<= value optimized out>, init=3D) at ../../gcc/fortran/trans-expr.c:4671 #7 0x0000000000568fac in gfc_conv_initializer (expr=3D0x1351d40, ts=3D0x13= 51b70, type=3D0x7ffff7f8b7e0, array=3D, pointer=3D,=20 procptr=3D) at ../../gcc/fortran/trans-expr.c:4204 #8 0x0000000000558181 in gfc_get_symbol_decl (sym=3D0x1351b50) at ../../gcc/fortran/trans-decl.c:1381 #9 0x0000000000558790 in generate_local_decl (sym=3D0x1351b50) at ../../gcc/fortran/trans-decl.c:4179 #10 0x000000000052f5e7 in traverse_ns (st=3D, func=3D0= x558590 ) at ../../gcc/fortran/symbol.c:3333 #11 0x000000000052f5d6 in traverse_ns (st=3D, func=3D0= x558590 ) at ../../gcc/fortran/symbol.c:3330 #12 0x000000000052f5d6 in traverse_ns (st=3D, func=3D0= x558590 ) at ../../gcc/fortran/symbol.c:3330 #13 0x000000000052f5d6 in traverse_ns (st=3D, func=3D0= x558590 ) at ../../gcc/fortran/symbol.c:3330 #14 0x000000000052f5d6 in traverse_ns (st=3D, func=3D0= x558590 ) at ../../gcc/fortran/symbol.c:3330 #15 0x000000000052f5d6 in traverse_ns (st=3D, func=3D0= x558590 ) at ../../gcc/fortran/symbol.c:3330 #16 0x000000000052f5d6 in traverse_ns (st=3D, func=3D0= x558590 ) at ../../gcc/fortran/symbol.c:3330 #17 0x000000000052f5d6 in traverse_ns (st=3D, func=3D0= x558590 ) at ../../gcc/fortran/symbol.c:3330 #18 0x000000000055c554 in generate_local_vars (ns=3D0x1350c10) at ../../gcc/fortran/trans-decl.c:4303 #19 gfc_generate_function_code (ns=3D0x1350c10) at ../../gcc/fortran/trans-decl.c:4782 #20 0x0000000000506d79 in translate_all_program_units () at ../../gcc/fortran/parse.c:4265 #21 gfc_parse_file () at ../../gcc/fortran/parse.c:4478 #22 0x000000000053f836 in gfc_be_parse_file () at ../../gcc/fortran/f95-lang.c:250 #23 0x000000000079f23c in compile_file (argc=3D13, argv=3D0x7fffffffdfb8) at ../../gcc/toplev.c:579 #24 do_compile (argc=3D13, argv=3D0x7fffffffdfb8) at ../../gcc/toplev.c:1900 #25 toplev_main (argc=3D13, argv=3D0x7fffffffdfb8) at ../../gcc/toplev.c:19= 63 #26 0x00007ffff7874c4d in __libc_start_main (main=3D, argc=3D, ubp_av=3D, init=3D,=20 fini=3D, rtld_fini=3D, stack_end=3D0x7fffffffdfa8) at libc-start.c:226 #27 0x000000000049fc05 in _start () (gdb)