ICE on wrong code [PR94192]

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ICE on wrong code [PR94192]

Linus König
Hi,

Here is the patch with some of the null pointer tests removed.

This is regression-tested. ChangeLog and test case are as in
https://gcc.gnu.org/pipermail/fortran/2020-April/054193.html .

The list of test cases that fail without the remaining NULL
check is below. Is this OK for trunk?

Best regards,

Linus König

FAIL: gfortran.dg/bound_8.f90 -O0 (internal compiler error)
FAIL: gfortran.dg/bound_2.f90 -O0 (internal compiler error)
FAIL: gfortran.dg/bound_8.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/bound_2.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/bound_8.f90 -O1 (internal compiler error)
FAIL: gfortran.dg/bound_8.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/bound_2.f90 -O1 (internal compiler error)
FAIL: gfortran.dg/bound_2.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/bound_8.f90 -O2 (internal compiler error)
FAIL: gfortran.dg/bound_8.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/bound_2.f90 -O2 (internal compiler error)
FAIL: gfortran.dg/bound_2.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/bound_8.f90 -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions (internal compiler error)
FAIL: gfortran.dg/bound_8.f90 -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions (test for excess errors)
FAIL: gfortran.dg/bound_2.f90 -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions (internal compiler error)
FAIL: gfortran.dg/bound_2.f90 -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions (test for excess errors)
FAIL: gfortran.dg/bound_8.f90 -O3 -g (internal compiler error)
FAIL: gfortran.dg/bound_8.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/bound_2.f90 -O3 -g (internal compiler error)
FAIL: gfortran.dg/bound_2.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/bound_8.f90 -Os (internal compiler error)
FAIL: gfortran.dg/bound_8.f90 -Os (test for excess errors)
FAIL: gfortran.dg/bound_2.f90 -Os (internal compiler error)
FAIL: gfortran.dg/bound_2.f90 -Os (test for excess errors)
FAIL: gfortran.dg/bound_7.f90 -O0 (internal compiler error)
FAIL: gfortran.dg/bound_7.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/bound_7.f90 -O1 (internal compiler error)
FAIL: gfortran.dg/bound_7.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/bound_7.f90 -O2 (internal compiler error)
FAIL: gfortran.dg/bound_7.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/bound_7.f90 -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions (internal compiler error)
FAIL: gfortran.dg/bound_7.f90 -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions (test for excess errors)
FAIL: gfortran.dg/bound_7.f90 -O3 -g (internal compiler error)
FAIL: gfortran.dg/bound_7.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/bound_7.f90 -Os (internal compiler error)
FAIL: gfortran.dg/bound_7.f90 -Os (test for excess errors)
FAIL: gfortran.dg/intrinsic_size_3.f90 -O (internal compiler error)
FAIL: gfortran.dg/intrinsic_size_3.f90 -O (test for excess errors)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O0 (internal compiler error)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O1 (internal compiler error)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O2 (internal compiler error)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions (internal
compiler error)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess
errors)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O3 -g (internal compiler
error)
FAIL: gfortran.dg/parameter_array_init_2.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/parameter_array_init_2.f90 -Os (internal compiler error)
FAIL: gfortran.dg/parameter_array_init_2.f90 -Os (test for excess errors)
FAIL: gfortran.dg/pr77429.f90 -O (internal compiler error)
FAIL: gfortran.dg/pr77429.f90 -O (test for errors, line 6)
FAIL: gfortran.dg/pr77429.f90 -O (test for excess errors)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O0 (internal compiler error)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O0 (test for excess errors)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O1 (internal compiler error)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O1 (test for excess errors)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O2 (internal compiler error)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O2 (test for excess errors)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions (internal
compiler error)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess
errors)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O3 -g (internal compiler error)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -O3 -g (test for excess errors)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -Os (internal compiler error)
FAIL: gfortran.dg/realloc_on_assign_1.f03 -Os (test for excess errors)
FAIL: gfortran.dg/shape_7.f90 -O (internal compiler error)
FAIL: gfortran.dg/shape_7.f90 -O (test for excess errors)


PR94192-v3.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ICE on wrong code [PR94192]

gcc - fortran mailing list
On Sat, Apr 11, 2020 at 10:27 AM Linus König <[hidden email]> wrote:
>
> Hi,
>
> Here is the patch with some of the null pointer tests removed.
>
> This is regression-tested. ChangeLog and test case are as in
> https://gcc.gnu.org/pipermail/fortran/2020-April/054193.html .

Thanks. Sorry I missed the ChangeLog entry and tests in my previous
email. Those look good.


> The list of test cases that fail without the remaining NULL
> check is below. Is this OK for trunk?

Thank you for the test listing.

I apologize for being pedantic, but the remaining NULL check is still
superfluous. The check can be removed simply by moving the new code
past the BT_CLASS and EXPR_VARIABLE checks, just before the loop, like
in my previous diffs. The idea is that when array->expr_type is
EXPR_VARIABLE, array->symtree is guaranteed not to be NULL. If this
invariant was violated, there are at least five functions in
simplify.c alone which would segfault, including simplify_bound, even
with this patch. Therefore I prefer not to check array->symtree for
NULL before the EXPR_VARIABLE test.

With that change I will OK the patch. If you and the regression tests
concur, I can commit for you. I believe this is appropriate for
backporting to 8 and 9 as well. Thanks again for your work.

---
Fritz