[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067 --- Comment #11 from kargl at gcc dot gnu.org --- Author: kargl Date: Thu Sep 29 19:34:59 2016 New Revision: 240635 URL: https://gcc.gnu.org/viewcvs?rev=240635=gcc=rev Log: 2016-09-29 Steven G. KarglBackport from trunk PR fortran/71067 * decl.c (match_data_constant): On error, set 'result' to NULL. PR fortran/77260 * gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning for unused variable if symbol is entry point. 2016-09-29 Steven G. Kargl Backport from trunk PR fortran/71067 * gfortran.dg/pr71067_1.f90: New test. * gfortran.dg/pr71067_2.f90: Ditto. PR fortran/77260 * gfortran.dg/pr77260_1.f90: New test. * gfortran.dg/pr77260_2.f90: Ditto. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr71067_1.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr71067_2.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77260_1.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77260_2.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/decl.c branches/gcc-5-branch/gcc/fortran/trans-decl.c branches/gcc-5-branch/gcc/testsuite/ChangeLog
[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067 kargl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org Target Milestone|4.9.4 |7.0 --- Comment #10 from kargl at gcc dot gnu.org --- fixed on trunk.
[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067 --- Comment #9 from kargl at gcc dot gnu.org --- Author: kargl Date: Thu Jul 28 23:12:23 2016 New Revision: 238842 URL: https://gcc.gnu.org/viewcvs?rev=238842=gcc=rev Log: 2016-07-28 Steven G. KarglPR fortran/71067 * decl.c (match_data_constant): On error, set 'result' to NULL. 2016-07-28 Steven G. Kargl PR fortran/71067 * gfortran.dg/pr71067_1.f90: New test. * gfortran.dg/pr71067_2.f90: Ditto. Added: trunk/gcc/testsuite/gfortran.dg/pr71067_1.f90 trunk/gcc/testsuite/gfortran.dg/pr71067_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067 --- Comment #8 from Dominique d'Humieres --- The patch in comment 7 fixes the ICE without regression. Steve, Will it help if I do the packaging or do you prefer to do it yourself?
[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067 Richard Biener changed: What|Removed |Added Priority|P3 |P4
[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067 Richard Biener changed: What|Removed |Added Target Milestone|--- |4.9.4
[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067 --- Comment #7 from kargl at gcc dot gnu.org --- (In reply to Gerhard Steinmetz from comment #0) > With a missing parameter attribute, or value not initialized : > > $ cat z1.f90 > program p >integer :: i = 0 >integer :: z(2) >data z /2*i/ > end > > $ gfortran-6 z1.f90 > f951: internal compiler error: free_expr0(): Bad expr type Index: decl.c === --- decl.c (revision 237855) +++ decl.c (working copy) @@ -395,6 +395,7 @@ match_data_constant (gfc_expr **result) { gfc_error ("Symbol %qs must be a PARAMETER in DATA statement at %C", name); + *result = NULL; return MATCH_ERROR; } else if (dt_sym && gfc_fl_struct (dt_sym->attr.flavor))
[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067 --- Comment #6 from Dominique d'Humieres --- > Thus I would consider the PR as 4.8/4.9/5/6/7 regression, do you agree? Yes, the change occurred between revisions r190641 (2012-08-24, error) and r190786 (2012-08-29, ICE). The backtrace is * thread #1: tid = 0x8d8367, 0x7fff811f2f06 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT * frame #0: 0x7fff811f2f06 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x7fff8cfc74ec libsystem_pthread.dylib`pthread_kill + 90 frame #2: 0x7fff8a5106e7 libsystem_c.dylib`abort + 129 frame #3: 0x0001010497b1 f951`uw_init_context_1(context=, outer_cfa=, outer_ra=) + 353 at unwind-dw2.c:1563 frame #4: 0x00010104a098 f951`_Unwind_Backtrace(trace=(f951`unwind at backtrace.c:68), trace_argument=0x7fff5fbfeb40) + 56 at unwind.inc:283 frame #5: 0x000100fa4589 f951`backtrace_full(state=0x0001426ff000, skip=, callback=, error_callback=, data=) + 105 at backtrace.c:127 frame #6: 0x000100f66213 f951`diagnostic_action_after_output(context=0x000141979dc0, diag_kind=) + 435 at diagnostic.c:481 frame #7: 0x000100f66828 f951`diagnostic_report_diagnostic(context=0x000141979dc0, diagnostic=0x7fff5fbfec10) + 680 at diagnostic.c:943 frame #8: 0x000100033fbd f951`gfc_internal_error(gmsgid="free_expr0(): Bad expr type") + 237 at error.c:1312 frame #9: 0x000100034d5e f951`::free_expr0(e=0x000144307ac0) + 286 at expr.c:494 frame #10: 0x000100034db9 f951`gfc_free_expr(e=0x000144307ac0) + 9 at expr.c:513 frame #11: 0x00010001f625 f951`gfc_free_data(gfc_data*) + 34 at decl.c:143 frame #12: 0x00010001f603 f951`gfc_free_data(p=0x000144307330) + 51 frame #13: 0x000100020747 f951`gfc_match_data() + 471 at decl.c:626 frame #14: 0x00010008286a f951`::match_word_omp_simd(subr=, old_locus=0x7fff5fbfee70, simd_matched=, str=)(), locus *, bool *, const char *) + 10 at parse.c:93 frame #15: 0x000100086ffa f951`::decode_statement() + 5322 at parse.c:457 frame #16: 0x000100087d24 f951`::next_statement() + 276 at parse.c:1080 frame #17: 0x00010008991d f951`::parse_spec(st=ST_DATA_DECL) + 3325 at parse.c:3637 frame #18: 0x00010008cbf7 f951`::parse_progunit(st=) + 39 at parse.c:5420 frame #19: 0x00010008e56a f951`gfc_parse_file() + 1146 at parse.c:5928 frame #20: 0x0001000d563b f951`::gfc_be_parse_file() + 59 at f95-lang.c:198 frame #21: 0x000100b663ca f951`::compile_file() + 58 at toplev.c:465 frame #22: 0x00010104e5d6 f951`toplev::main(int, char**) + 1561 at toplev.c:1998 frame #23: 0x00010104dfbd f951`toplev::main(this=0x7fff5fbff340, argc=, argv=) + 733 frame #24: 0x00010104fe29 f951`main(argc=2, argv=0x7fff5fbff380) + 41 at main.c:39 frame #25: 0x7fff810c35ad libdyld.dylib`start + 1 Tobias Burnus has committed several changes around "free" in this range.