public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jellby at yahoo dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/101827] New: Wrong stringop-overflow warning Date: Mon, 09 Aug 2021 09:52:23 +0000 [thread overview] Message-ID: <bug-101827-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101827 Bug ID: 101827 Summary: Wrong stringop-overflow warning Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jellby at yahoo dot com Target Milestone: --- When trying to compile OpenMolcas with gcc 10.1 and link-time optimization I get: ../src/slapaf_util/outofplane_list.f: In function ‘outofplane_list’: ../src/slapaf_util/outofplane_list.f:524: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 524 | Lbls(3)(iE3+1:iE3+1)='(' | ../src/slapaf_util/outofplane_list.f:45:32: note: at offset 0 to object ‘lbls’ with size 40 declared here 45 | Character*(LENIN4) Lbls(4) | ^ [...] lto1: all warnings being treated as errors lto-wrapper: fatal error: /usr/bin/gfortran returned 1 exit status How is "Lbls(3)(iE3+1:iE3+1)" a region of size 0? Similar constructs elsewhere don't raise the flag. Does the compiler believe "iE3+1" is beyond the length of the string? But then it says nothing without -flto.
next reply other threads:[~2021-08-09 9:52 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-09 9:52 jellby at yahoo dot com [this message] 2021-08-09 12:53 ` [Bug fortran/101827] " rguenth at gcc dot gnu.org 2021-08-09 14:18 ` jellby at yahoo dot com
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-101827-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).