[Bug fortran/101329] ICE: Invalid expression in gfc_element_size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101329 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:93c066f568822680506811d0de9c57c8a7a4e5d2 commit r10-10361-g93c066f568822680506811d0de9c57c8a7a4e5d2 Author: Harald Anlauf Date: Wed Nov 17 22:21:24 2021 +0100 Fortran: NULL() is not interoperable gcc/fortran/ChangeLog: PR fortran/101329 * check.c (is_c_interoperable): Reject NULL() as it is not interoperable. gcc/testsuite/ChangeLog: PR fortran/101329 * gfortran.dg/pr101329.f90: New test. Co-authored-by: Steven G. Kargl (cherry picked from commit 3535be6c6f440909798d1c78e862a657f7adaf63)
[Bug fortran/101329] ICE: Invalid expression in gfc_element_size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101329 --- Comment #5 from CVS Commits --- The releases/gcc-11 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:a25bfec3aacc34be624a620b00a72719ac03092f commit r11-9417-ga25bfec3aacc34be624a620b00a72719ac03092f Author: Harald Anlauf Date: Wed Nov 17 22:21:24 2021 +0100 Fortran: NULL() is not interoperable gcc/fortran/ChangeLog: PR fortran/101329 * check.c (is_c_interoperable): Reject NULL() as it is not interoperable. gcc/testsuite/ChangeLog: PR fortran/101329 * gfortran.dg/pr101329.f90: New test. Co-authored-by: Steven G. Kargl (cherry picked from commit 3535be6c6f440909798d1c78e862a657f7adaf63)
[Bug fortran/101329] ICE: Invalid expression in gfc_element_size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101329 anlauf at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #4 from anlauf at gcc dot gnu.org --- Fixed for gcc-12. Closing. Thanks for the report!
[Bug fortran/101329] ICE: Invalid expression in gfc_element_size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101329 --- Comment #3 from CVS Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:3535be6c6f440909798d1c78e862a657f7adaf63 commit r12-5384-g3535be6c6f440909798d1c78e862a657f7adaf63 Author: Harald Anlauf Date: Wed Nov 17 22:21:24 2021 +0100 Fortran: NULL() is not interoperable gcc/fortran/ChangeLog: PR fortran/101329 * check.c (is_c_interoperable): Reject NULL() as it is not interoperable. gcc/testsuite/ChangeLog: PR fortran/101329 * gfortran.dg/pr101329.f90: New test. Co-authored-by: Steven G. Kargl
[Bug fortran/101329] ICE: Invalid expression in gfc_element_size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101329 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED CC||anlauf at gcc dot gnu.org --- Comment #2 from anlauf at gcc dot gnu.org --- Packaged: https://gcc.gnu.org/pipermail/fortran/2021-November/057029.html
[Bug fortran/101329] ICE: Invalid expression in gfc_element_size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101329 kargl at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2021-07-05 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC||kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 27bf3a7eafe..98155ce9d4c 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -5217,6 +5217,12 @@ is_c_interoperable (gfc_expr *expr, const char **msg, bool c_loc, bool c_f_ptr) { *msg = NULL; + if (expr->expr_type == EXPR_NULL) +{ + *msg = "NULL() is not interoperable"; + return false; +} + if (expr->ts.type == BT_CLASS) { *msg = "Expression is polymorphic";