public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "adrian at llnl dot gov" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-52679-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52679

             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=26962
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 

  f951: internal compiler error: Segmentation fault
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <http://gcc.gnu.org/bugs.html> for instructions.

I've attached a delta-reduced test case.



This is the valgrind output:
==6154== Invalid read of size 1
==6154==    at 0x5F8B3E: mpz_get_double_int (double-int.c:1145)
==6154==    by 0x554001: gfc_conv_mpz_to_tree (trans-const.c:204)
==6154==    by 0x55480F: gfc_conv_constant (trans-const.c:396)
==6154==    by 0x568EBB: gfc_conv_initializer (trans-expr.c:4162)
==6154==    by 0x56139B: gfc_conv_structure (trans-expr.c:4671)
==6154==    by 0x568FAB: gfc_conv_initializer (trans-expr.c:4204)
==6154==    by 0x56139B: gfc_conv_structure (trans-expr.c:4671)
==6154==    by 0x568FAB: gfc_conv_initializer (trans-expr.c:4204)
==6154==    by 0x558180: gfc_get_symbol_decl (trans-decl.c:1381)
==6154==    by 0x55878F: generate_local_decl (trans-decl.c:4179)
==6154==    by 0x52F5E6: traverse_ns (symbol.c:3333)
==6154==    by 0x52F5D5: traverse_ns (symbol.c:3330)
==6154==  Address 0x2 is not stack'd, malloc'd or (recently) free'd
==6154== 
test.f03: In function ‘args_basic_wrap’:
test.f03:31:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
==6154== 
==6154== HEAP SUMMARY:
==6154==     in use at exit: 865,260 bytes in 3,348 blocks
==6154==   total heap usage: 7,483 allocs, 4,135 frees, 1,552,569 bytes
allocated
==6154== 
==6154== LEAK SUMMARY:
==6154==    definitely lost: 12,294 bytes in 73 blocks
==6154==    indirectly lost: 3,504 bytes in 6 blocks
==6154==      possibly lost: 352 bytes in 18 blocks
==6154==    still reachable: 849,110 bytes in 3,251 blocks
==6154==         suppressed: 0 bytes in 0 blocks
==6154== Rerun with --leak-check=full to see details of leaked memory
==6154== 
==6154== For counts of detected and suppressed errors, rerun with: -v
==6154== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4)
==6138== 
==6138== HEAP SUMMARY:
==6138==     in use at exit: 32,121 bytes in 82 blocks
==6138==   total heap usage: 498 allocs, 416 frees, 60,580 bytes allocated
==6138== 
==6138== LEAK SUMMARY:
==6138==    definitely lost: 5,444 bytes in 29 blocks
==6138==    indirectly lost: 45 bytes in 3 blocks
==6138==      possibly lost: 29 bytes in 2 blocks
==6138==    still reachable: 26,603 bytes in 48 blocks
==6138==         suppressed: 0 bytes in 0 blocks
==6138== Rerun with --leak-check=full to see details of leaked memory
==6138== 
==6138== For counts of detected and suppressed errors, rerun with: -v
==6138== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)


Backtrace in gdb:

Program received signal SIGSEGV, Segmentation fault.
mpz_get_double_int (type=0x0, val=0x136b528, wrap=1 '\001') at
../../gcc/double-int.c:1145
1145      res = double_int_ext (res, TYPE_PRECISION (type), TYPE_UNSIGNED
(type));
(gdb) l
1140      gcc_assert (wrap || count <= 2);
1141    
1142      res.low = vp[0];
1143      res.high = (HOST_WIDE_INT) vp[1];
1144    
1145      res = double_int_ext (res, TYPE_PRECISION (type), TYPE_UNSIGNED
(type));
1146      if (mpz_sgn (val) < 0)
1147        res = double_int_neg (res);
1148    
1149      return res;
(gdb) bt
#0  mpz_get_double_int (type=0x0, val=0x136b528, wrap=1 '\001') at
../../gcc/double-int.c:1145
#1  0x0000000000554002 in gfc_conv_mpz_to_tree (i=0x136b528, kind=0) at
../../gcc/fortran/trans-const.c:204
#2  0x0000000000554810 in gfc_conv_constant (se=0x7fffffffd870, expr=0x136b4b0)
at ../../gcc/fortran/trans-const.c:396
#3  0x0000000000568ebc in gfc_conv_initializer (expr=0x136b4b0, ts=0x137d008,
type=0x7ffff7e9cdc8, array=<value optimized out>, pointer=<value optimized
out>, 
    procptr=<value optimized out>) at ../../gcc/fortran/trans-expr.c:4162
#4  0x000000000056139c in gfc_conv_structure (se=0x7fffffffd940, expr=<value
optimized out>, init=<value optimized out>) at
../../gcc/fortran/trans-expr.c:4671
#5  0x0000000000568fac in gfc_conv_initializer (expr=0x135c830, ts=0x1375de8,
type=0x7ffff7f85bd0, array=<value optimized out>, pointer=<value optimized
out>, 
    procptr=<value optimized out>) at ../../gcc/fortran/trans-expr.c:4204
#6  0x000000000056139c in gfc_conv_structure (se=0x7fffffffda10, expr=<value
optimized out>, init=<value optimized out>) at
../../gcc/fortran/trans-expr.c:4671
#7  0x0000000000568fac in gfc_conv_initializer (expr=0x1351d40, ts=0x1351b70,
type=0x7ffff7f8b7e0, array=<value optimized out>, pointer=<value optimized
out>, 
    procptr=<value optimized out>) at ../../gcc/fortran/trans-expr.c:4204
#8  0x0000000000558181 in gfc_get_symbol_decl (sym=0x1351b50) at
../../gcc/fortran/trans-decl.c:1381
#9  0x0000000000558790 in generate_local_decl (sym=0x1351b50) at
../../gcc/fortran/trans-decl.c:4179
#10 0x000000000052f5e7 in traverse_ns (st=<value optimized out>, func=0x558590
<generate_local_decl>) at ../../gcc/fortran/symbol.c:3333
#11 0x000000000052f5d6 in traverse_ns (st=<value optimized out>, func=0x558590
<generate_local_decl>) at ../../gcc/fortran/symbol.c:3330
#12 0x000000000052f5d6 in traverse_ns (st=<value optimized out>, func=0x558590
<generate_local_decl>) at ../../gcc/fortran/symbol.c:3330
#13 0x000000000052f5d6 in traverse_ns (st=<value optimized out>, func=0x558590
<generate_local_decl>) at ../../gcc/fortran/symbol.c:3330
#14 0x000000000052f5d6 in traverse_ns (st=<value optimized out>, func=0x558590
<generate_local_decl>) at ../../gcc/fortran/symbol.c:3330
#15 0x000000000052f5d6 in traverse_ns (st=<value optimized out>, func=0x558590
<generate_local_decl>) at ../../gcc/fortran/symbol.c:3330
#16 0x000000000052f5d6 in traverse_ns (st=<value optimized out>, func=0x558590
<generate_local_decl>) at ../../gcc/fortran/symbol.c:3330
#17 0x000000000052f5d6 in traverse_ns (st=<value optimized out>, func=0x558590
<generate_local_decl>) at ../../gcc/fortran/symbol.c:3330
#18 0x000000000055c554 in generate_local_vars (ns=0x1350c10) at
../../gcc/fortran/trans-decl.c:4303
#19 gfc_generate_function_code (ns=0x1350c10) 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=13, argv=0x7fffffffdfb8) at
../../gcc/toplev.c:579
#24 do_compile (argc=13, argv=0x7fffffffdfb8) at ../../gcc/toplev.c:1900
#25 toplev_main (argc=13, argv=0x7fffffffdfb8) at ../../gcc/toplev.c:1963
#26 0x00007ffff7874c4d in __libc_start_main (main=<value optimized out>,
argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized
out>, 
    fini=<value optimized out>, rtld_fini=<value optimized out>,
stack_end=0x7fffffffdfa8) at libc-start.c:226
#27 0x000000000049fc05 in _start ()
(gdb)


             reply	other threads:[~2012-03-22 22:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 22:18 adrian at llnl dot gov [this message]
2012-04-03 14:26 ` [Bug fortran/52679] " burnus at gcc dot gnu.org
2012-04-03 14:28 ` [Bug fortran/52679] [4.6 Regression] " burnus at gcc dot gnu.org
2012-04-03 14:34 ` burnus at gcc dot gnu.org
2012-04-09 14:44 ` janus at gcc dot gnu.org
2012-11-24 14:09 ` janus at gcc dot gnu.org
2012-11-24 14:13 ` janus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52679-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).