http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53691
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-06-16 06:15:39 UTC --- (In reply to comment #2) > It yields a segmentation fault when compiled with -Wsurprising. Hence, the workaround is to compile with -Wno-surprising. Untested draft patch: --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -3997,3 +3996,6 @@ gfc_calculate_transfer_sizes (gfc_expr *source, gfc_expr *mold, gfc_expr *size, - /* Calculate the size of the source. */ + if (size && size->expr_type != EXPR_CONSTANT) + return FAILURE; + + /* Calculate the size of the source. */ if (source->expr_type == EXPR_ARRAY