public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/94331] Bind(C) corrupts array descriptors
Date: Sun, 30 May 2021 17:04:03 +0000 [thread overview]
Message-ID: <bug-94331-4-Zb90UxipFS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94331-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94331
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |ASSIGNED
--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Patch posted:
>
> https://gcc.gnu.org/pipermail/fortran/2021-May/056054.html
With the patch the test PR94331.f90 fails with -flto:
% gfc /opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.f90
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c -flto
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.f90:121:10: warning: type of
'checkb_o_ar' does not match original declaration [-Wlto-type-mismatch]
121 | if(.not.checkb_o_ar(a, 0, ex-1))stop 28
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type mismatch in
parameter 2
38 | check_bounds (const CFI_cdesc_t *restrict auxp, const CFI_index_t lb,
const CFI_index_t ub)
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type
'CFI_index_t' should match type 'int'
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.f90:111:10: warning: type of
'checkb_o_as' does not match original declaration [-Wlto-type-mismatch]
111 | if(.not.checkb_o_as(a, 0, ex-1))stop 20
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type mismatch in
parameter 2
38 | check_bounds (const CFI_cdesc_t *restrict auxp, const CFI_index_t lb,
const CFI_index_t ub)
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type
'CFI_index_t' should match type 'int'
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.f90:101:10: warning: type of
'checkb_p_ar' does not match original declaration [-Wlto-type-mismatch]
101 | if(.not.checkb_p_ar(a, lb, ub)) stop 12
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type mismatch in
parameter 2
38 | check_bounds (const CFI_cdesc_t *restrict auxp, const CFI_index_t lb,
const CFI_index_t ub)
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type
'CFI_index_t' should match type 'int'
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.f90:91:10: warning: type of
'checkb_p_as' does not match original declaration [-Wlto-type-mismatch]
91 | if(.not.checkb_p_as(a, lb, ub)) stop 4
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type mismatch in
parameter 2
38 | check_bounds (const CFI_cdesc_t *restrict auxp, const CFI_index_t lb,
const CFI_index_t ub)
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type
'CFI_index_t' should match type 'int'
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.f90:167:10: warning: type of
'checkb_a_ar' does not match original declaration [-Wlto-type-mismatch]
167 | if(.not.checkb_a_ar(b, lb, ub)) stop 63
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type mismatch in
parameter 2
38 | check_bounds (const CFI_cdesc_t *restrict auxp, const CFI_index_t lb,
const CFI_index_t ub)
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type
'CFI_index_t' should match type 'int'
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.f90:155:10: warning: type of
'checkb_a_as' does not match original declaration [-Wlto-type-mismatch]
155 | if(.not.checkb_a_as(b, lb, ub)) stop 54
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type mismatch in
parameter 2
38 | check_bounds (const CFI_cdesc_t *restrict auxp, const CFI_index_t lb,
const CFI_index_t ub)
| ^
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: type
'CFI_index_t' should match type 'int'
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: 'check_bounds'
was previously declared here
/opt/gcc/work/gcc/testsuite/gfortran.dg/PR94331.c:38:1: note: code may be
misoptimized unless '-fno-strict-aliasing' is used
Note that the original test seems fixed even with -flto.
next prev parent reply other threads:[~2021-05-30 17:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 15:52 [Bug fortran/94331] New: " jrfsousa at gmail dot com
2020-03-25 15:52 ` [Bug fortran/94331] " jrfsousa at gmail dot com
2020-07-23 20:08 ` dominiq at lps dot ens.fr
2021-05-12 3:15 ` sandra at gcc dot gnu.org
2021-05-14 3:04 ` sandra at gcc dot gnu.org
2021-05-14 16:16 ` jrfsousa at gcc dot gnu.org
2021-05-19 18:09 ` jrfsousa at gcc dot gnu.org
2021-05-30 17:04 ` dominiq at lps dot ens.fr [this message]
2021-05-30 17:12 ` dominiq at lps dot ens.fr
2021-05-30 20:17 ` jrfsousa at gcc dot gnu.org
2021-05-30 20:18 ` jrfsousa at gcc dot gnu.org
2021-05-30 20:48 ` dominiq at lps dot ens.fr
2021-06-14 23:14 ` jrfsousa at gcc dot gnu.org
2021-06-14 23:22 ` jrfsousa at gcc dot gnu.org
2021-07-26 12:33 ` cvs-commit at gcc dot gnu.org
2021-10-19 10:20 ` burnus 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-94331-4-Zb90UxipFS@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: link
Be 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).