Discussion:
[patch, fortran] Fix PR 70260, ICE on invalid
Thomas Koenig
2018-11-11 15:59:07 UTC
Permalink
Hello world,

the attached patch fixes both ICEs in the PR by adding some tests.
It was necessary to shuffle around a bit of code, plus to make sure that
double error reporting did not become too bad.

Regression-tested. OK for trunk?

Regards

Thomas


2018-11-11 Thomas Koenig <***@gcc.gnu.org>

PR fortran/70260
* expr.c (gfc_check_assign): Reject assigning to an external
symbol.
(gfc_check_pointer_assign): Add suppress_type_test
argument. Insert line after if. A non-proc pointer can not point
to a constant. Only check types if suppress_type_test is false.
* gfortran.h (gfc_check_pointer_assign): Add optional
suppress_type_test argument.
* resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
and give it the extra argument.
(resolve_fl_procedure): Set error on value for a function with
an inizializer.

2018-11-11 Thomas Koenig <***@gcc.gnu.org>

PR fortran/70260
* gfortran.dg/proc_ptr_result_5.f90: Add dg-error directive.
* gfortran.dg/protected_4.f90: Split line to allow for extra error.
* gfortran.dg/protected_6.f90: Likewise.
* gfortran.dg/assign_11.f90: New test.
* gfortran.dg/pointer_assign_12.f90: New test.
Thomas Koenig
2018-11-17 15:10:00 UTC
Permalink
Hi,
Post by Thomas Koenig
the attached patch fixes both ICEs in the PR by adding some tests.
It was necessary to shuffle around a bit of code, plus to make sure that
double error reporting did not become too bad.
Regression-tested. OK for trunk?
Ping?

Regards

Thomas
Paul Richard Thomas
2018-11-17 16:22:21 UTC
Permalink
Hi Thomas,

OK for trunk.

Thanks for working on it.

Paul
Post by Thomas Koenig
Hi,
Post by Thomas Koenig
the attached patch fixes both ICEs in the PR by adding some tests.
It was necessary to shuffle around a bit of code, plus to make sure that
double error reporting did not become too bad.
Regression-tested. OK for trunk?
Ping?
Regards
Thomas
--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein
Thomas Koenig
2018-11-18 09:17:01 UTC
Permalink
Hi Paul1
Post by Paul Richard Thomas
OK for trunk.
Thanks for working on it.
Committed as r266248.

Thanks for the review!

Regards

Thomas

Jerry DeLisle
2018-11-17 16:03:50 UTC
Permalink
Post by Thomas Koenig
Hello world,
the attached patch fixes both ICEs in the PR by adding some tests.
It was necessary to shuffle around a bit of code, plus to make sure that
double error reporting did not become too bad.
Regression-tested. OK for trunk?
Regards
    Thomas
On vacation in Florida for a few days with Grandkids.

Looks Good To Me. OK

Jerry
Loading...