This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52093] [4.6/4.7 Regression] Extra parenthesis with Size and Shape functions argument cause internal compiler error: Segmentation fault
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 02 Feb 2012 08:28:27 +0000
- Subject: [Bug fortran/52093] [4.6/4.7 Regression] Extra parenthesis with Size and Shape functions argument cause internal compiler error: Segmentation fault
- Auto-submitted: auto-generated
- References: <bug-52093-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52093
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
Target Milestone|--- |4.6.3
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-02 08:28:27 UTC ---
For me (on 4.7), SHAPE and LBOUND work, only SIZE and UBOUND cause an ICE.
The segfault happens for SIZE and UBOUND at:
Invalid read of size 4
at 0x5383E0: gfc_simplify_size (simplify.c:5553)
(When patching, remember that UBOUND((X)) and UBOUND(X) are different, it the
lower bound of X is not 1.)
Untested patch:
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -5543,2 +5543,3 @@ gfc_simplify_size (gfc_expr *array, gfc_expr *dim,
gfc_expr *kind)
case INTRINSIC_UMINUS:
+ case INTRINSIC_PARENTHESES:
replacement = array->value.op.op1;