[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-fortran
Subject: [patch, fortran] PR35724 [4.3/4.4 Regression] Compile time segmentation fault for CSHIFT with negat
From: Jerry DeLisle <jvdelisle () verizon ! net>
Date: 2008-03-28 4:43:21
Message-ID: 1206679401.2916.11.camel () lenova ! localdomain
[Download RAW message or body]
Hi all,
The following patch fixes this regression by checking for the NULL
symtree pointer and not attempting to access it.
I will commit as obvious. I will also backport to 4.3. Test case will
be that in the PR.
Regression tested on X86-64
I apologize for the breakage.
Jerry
Index: iresolve.c
===================================================================
--- iresolve.c (revision 133275)
+++ iresolve.c (working copy)
@@ -597,7 +597,8 @@ gfc_resolve_cshift (gfc_expr *f, gfc_exp
if (dim != NULL)
{
- if (dim->expr_type != EXPR_CONSTANT &&
dim->symtree->n.sym->attr.optional)
+ if (dim->expr_type != EXPR_CONSTANT && dim->symtree != NULL
+ && dim->symtree->n.sym->attr.optional)
{
/* Mark this for later setting the type in
gfc_conv_missing_dummy. */
dim->representation.length = shift->ts.kind;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic