public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rimvydas.jas at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/101917] New: Spurious -Wstringop-overread with -flto when passing zero sized arrays Date: Sun, 15 Aug 2021 08:40:06 +0000 [thread overview] Message-ID: <bug-101917-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101917 Bug ID: 101917 Summary: Spurious -Wstringop-overread with -flto when passing zero sized arrays Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: rimvydas.jas at gmail dot com Target Milestone: --- $ cat bar.c void bar_(const int flag[], const int *num) { } $ cat foo.f90 program foo integer :: idummy(0) call bar(idummy, 0) end program $ gcc -flto -c bar.c $ gfortran -Wall -Wextra -flto -c foo.f90 $ gfortran -Wall -Wextra -flto foo.o bar.o foo.f90: In function 'foo': foo.f90:3:19: warning: 'bar_' reading 4 bytes from a region of size 0 [-Wstringop-overread] 3 | call bar(idummy, 0) | ^ foo.f90:3:19: note: referencing argument 1 of type 'const int *' bar.c:1:6: note: in a call to function 'bar_' 1 | void bar_(const int flag[], const int *num) { } | ^
next reply other threads:[~2021-08-15 8:40 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-15 8:40 rimvydas.jas at gmail dot com [this message] 2021-11-10 4:48 ` [Bug middle-end/101917] [11 Regression] " msebor at gcc dot gnu.org 2021-11-16 13:08 ` rguenth at gcc dot gnu.org 2022-04-21 7:50 ` rguenth at gcc dot gnu.org 2023-05-29 10:05 ` jakub 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-101917-4@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).