public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/106500] ICE on function as an argument to c_sizeof() Date: Mon, 01 Aug 2022 19:47:31 +0000 [thread overview] Message-ID: <bug-106500-4-7CLrpbisQ3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106500-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106500 --- Comment #1 from kargl at gcc dot gnu.org --- Changed subject as it's unclear whether it is invalid or not. In any case, this patch allows the code to compile and it produces the expected output. % gfcx -o z a.f90 % ./z 4 16 diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc index 0c2cb50c6a7..b9d460f133e 100644 --- a/gcc/fortran/check.cc +++ b/gcc/fortran/check.cc @@ -5266,6 +5266,9 @@ is_c_interoperable (gfc_expr *expr, const char **msg, bool c_loc, bool c_f_ptr) return false; } + if ( expr->expr_type == EXPR_FUNCTION) + return true; + if (!c_loc && expr->rank > 0 && expr->expr_type != EXPR_ARRAY) { gfc_array_ref *ar = gfc_find_array_ref (expr);
next prev parent reply other threads:[~2022-08-01 19:47 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-01 19:20 [Bug fortran/106500] New: ICE on invalid " kargl at gcc dot gnu.org 2022-08-01 19:47 ` kargl at gcc dot gnu.org [this message] 2022-09-07 17:15 ` [Bug fortran/106500] ICE on function as an " gscfq@t-online.de 2022-09-07 18:13 ` kargl at gcc dot gnu.org 2024-04-05 17:18 ` anlauf at gcc dot gnu.org 2024-04-08 19:03 ` anlauf at gcc dot gnu.org 2024-04-08 19:58 ` anlauf at gcc dot gnu.org 2024-04-10 17:04 ` cvs-commit at gcc dot gnu.org 2024-04-10 19:49 ` anlauf at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-106500-4-7CLrpbisQ3@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).