From: Janus Weil Date: Sat, 11 Jan 2014 22:47:25 +0000 (+0100) Subject: backport: re PR fortran/59612 ([F03] iso_fortran_env segfaults with -fdump-fortran... X-Git-Tag: releases/gcc-4.7.4~324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e5b6fbb5a039bc2e3315446aadc1fa05dad421b;p=thirdparty%2Fgcc.git backport: re PR fortran/59612 ([F03] iso_fortran_env segfaults with -fdump-fortran-original) 2014-01-11 Janus Weil Backport from mainline 2013-12-29 Janus Weil PR fortran/59612 PR fortran/57042 * dump-parse-tree.c (show_typespec): Check for charlen. * invoke.texi: Fix documentation of -fdump-fortran-optimized and -fdump-parse-tree. From-SVN: r206560 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 174594b0e077..4cd4f6829bcb 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,14 @@ +2014-01-11 Janus Weil + + Backport from mainline + 2013-12-29 Janus Weil + + PR fortran/59612 + PR fortran/57042 + * dump-parse-tree.c (show_typespec): Check for charlen. + * invoke.texi: Fix documentation of -fdump-fortran-optimized and + -fdump-parse-tree. + 2013-11-17 Paul Thomas PR fortran/58771 diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index c715b30d3973..9cab3e779bde 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -104,7 +104,8 @@ show_typespec (gfc_typespec *ts) break; case BT_CHARACTER: - show_expr (ts->u.cl->length); + if (ts->u.cl) + show_expr (ts->u.cl->length); fprintf(dumpfile, " %d", ts->kind); break; diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 1f6de84b99f4..a101d63e1dc4 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -940,11 +940,12 @@ Output the internal parse tree after translating the source program into internal representation. Only really useful for debugging the GNU Fortran compiler itself. -@item -fdump-optimized-tree +@item -fdump-fortran-optimized @opindex @code{fdump-fortran-optimized} Output the parse tree after front-end optimization. Only really useful for debugging the GNU Fortran compiler itself. +@item -fdump-parse-tree @opindex @code{fdump-parse-tree} Output the internal parse tree after translating the source program into internal representation. Only really useful for debugging the