Commit 97d650cc by Jerry DeLisle

re PR fortran/35724 (Compile time segmentation fault for CSHIFT with negative third arg)

2008-03-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/35724
	* iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
	optional argument attribute.

From-SVN: r133668
parent 5bbc43bf
2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/35724
* iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
optional argument attribute.
2008-03-27 Tom Tromey <tromey@redhat.com>
* Make-lang.in: Revert automatic dependency patch.
......
......@@ -597,7 +597,8 @@ gfc_resolve_cshift (gfc_expr *f, gfc_expr *array, gfc_expr *shift,
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment