[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 --- Comment #10 from Thomas Koenig tkoenig at gcc dot gnu.org 2011-12-11 20:03:47 UTC --- Author: tkoenig Date: Sun Dec 11 20:03:43 2011 New Revision: 182209 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=182209 Log: 2011-12-11 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/51338 Backport from trunk * dependency.c (are_identical_variables): Handle case where end fields of substring references are NULL. 2011-12-11 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/51338 Backport from trunk * gfortran.dg/assumed_charlen_substring_1.f90: New test. Modified: branches/gcc-4_6-branch/gcc/fortran/ChangeLog branches/gcc-4_6-branch/gcc/fortran/dependency.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 Thomas Koenig tkoenig at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #11 from Thomas Koenig tkoenig at gcc dot gnu.org 2011-12-11 20:04:39 UTC --- Fixed on trunk and 4.6, closing.
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.6.3
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- Comment #8 from Tobias Burnus burnus at gcc dot gnu.org 2011-12-05 14:40:56 UTC --- (In reply to comment #7) I'll look at it. Thanks for the analysis and the fix! Thomas' patch: http://gcc.gnu.org/ml/fortran/2011-11/msg00254.html Review (approval): http://gcc.gnu.org/ml/fortran/2011-12/msg00023.html
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 CC||jakub at gcc dot gnu.org
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 --- Comment #9 from Thomas Koenig tkoenig at gcc dot gnu.org 2011-12-05 20:11:53 UTC --- Author: tkoenig Date: Mon Dec 5 20:11:44 2011 New Revision: 182024 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=182024 Log: 2011-12-05 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/51338 * dependency.c (are_identical_variables): Handle case where end fields of substring references are NULL. 2011-12-05 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/51338 * gfortran.dg/assumed_charlen_substring_1.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/assumed_charlen_substring_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/dependency.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 Thomas Koenig tkoenig at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |tkoenig at gcc dot gnu.org |gnu.org | --- Comment #7 from Thomas Koenig tkoenig at gcc dot gnu.org 2011-11-29 17:45:05 UTC --- (In reply to comment #6) The above patch has no new testsuite regressions. If someone wants to check and make sure the optimisation(s) that could or were being done is still correct, and check this in, feel free to do so. 1 Hour 40 minutes after bug posted. not bad. I'll look at it. Thanks for the analysis and the fix! Thomas
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 Dominique d'Humieres dominiq at lps dot ens.fr changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2011-11-28 CC||tkoenig at gcc dot gnu.org Summary|seg fault in|[4.6/4.7 Regression] seg |gfc_dep_compare_expr with |fault in |-O2 |gfc_dep_compare_expr with ||-O2 Ever Confirmed|0 |1 --- Comment #4 from Dominique d'Humieres dominiq at lps dot ens.fr 2011-11-28 22:22:59 UTC --- Workaround -fno-frontend-optimize. Revision 164728 (20100929) is OK revision 165415 (20101013) gives the segmentation fault. Likely Revision 165248 Author:tkoenig Date:Sun Oct 10 09:52:46 2010 UTC (13 months, 2 weeks ago) Changed paths:7 Log Message: 2010-10-09 Thomas Koenig tkoe...@gcc.gnu.org * frontend-passes.c: Include opts.h. (optimize_comparison): Renamed from optimize_equality. Change second argument to operation to be compared. Use flag_finite_math_only to avoid comparing REAL and COMPLEX only when NANs are honored. Simplify comparing of string concatenations where left or right operands are equal. Simplify all comparison operations, based on the result of gfc_dep_compare_expr. * dependency.c: Include arith.h. (gfc_are_identical_variables): Volatile variables should not compare equal to themselves. (gfc_dep_compare_expr): Handle string constants and string concatenations.
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 --- Comment #5 from Bud Davis bdavis at gcc dot gnu.org 2011-11-28 22:49:33 UTC --- Index: gcc/gcc/fortran/dependency.c === --- gcc/gcc/fortran/dependency.c(revision 181789) +++ gcc/gcc/fortran/dependency.c(working copy) @@ -245,6 +245,10 @@ int i; gfc_expr *n1, *n2; + /* nothing to do here, move along */ + if (e1 == NULL e2 == NULL) + return 0; + n1 = NULL; n2 = NULL;
[Bug fortran/51338] [4.6/4.7 Regression] seg fault in gfc_dep_compare_expr with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51338 --- Comment #6 from Bud Davis bdavis at gcc dot gnu.org 2011-11-28 23:20:27 UTC --- The above patch has no new testsuite regressions. If someone wants to check and make sure the optimisation(s) that could or were being done is still correct, and check this in, feel free to do so. 1 Hour 40 minutes after bug posted. not bad. --bud