public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ajmay81 at googlemail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/96886] New: valgrind error with optional character argument of unknown length Date: Tue, 01 Sep 2020 19:53:38 +0000 [thread overview] Message-ID: <bug-96886-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96886 Bug ID: 96886 Summary: valgrind error with optional character argument of unknown length Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: ajmay81 at googlemail dot com Target Milestone: --- Looks like a regression between 10.1.0 and 10.2.0. test.f90: module test_module implicit none contains subroutine testsub0(propnam) character(*), intent(in), optional :: propnam(*) if(.not.present(propnam)) then stop 'property names not given' else write(*,*) propnam(1) endif end subroutine testsub0 end module test_module program bug use test_module implicit none character(8) :: prop(1) prop(1)='POT' call testsub0(propnam=prop) end program bug bug> module load gcc/10.2.0 bug> gfortran test.f90 && valgrind ./a.out ==31524== Memcheck, a memory error detector ==31524== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==31524== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==31524== Command: ./a.out ==31524== ==31524== Conditional jump or move depends on uninitialised value(s) ==31524== at 0x400741: __test_module_MOD_testsub0 (in /home/andy/bug/a.out) ==31524== by 0x400825: MAIN__ (in /home/andy/bug/a.out) ==31524== by 0x40085C: main (in /home/andy/bug/a.out) ==31524== ==31524== Conditional jump or move depends on uninitialised value(s) ==31524== at 0x400762: __test_module_MOD_testsub0 (in /home/andy/bug/a.out) ==31524== by 0x400825: MAIN__ (in /home/andy/bug/a.out) ==31524== by 0x40085C: main (in /home/andy/bug/a.out) ==31524== STOP property names not given ==31524== ==31524== HEAP SUMMARY: ==31524== in use at exit: 0 bytes in 0 blocks ==31524== total heap usage: 21 allocs, 21 frees, 13,584 bytes allocated ==31524== ==31524== All heap blocks were freed -- no leaks are possible ==31524== ==31524== Use --track-origins=yes to see where uninitialised values come from ==31524== For lists of detected and suppressed errors, rerun with: -s ==31524== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) bug> module purge bug> module load gcc/10.1.0 bug> gfortran test.f90 && valgrind ./a.out ==31516== Memcheck, a memory error detector ==31516== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==31516== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==31516== Command: ./a.out ==31516== POT ==31516== ==31516== HEAP SUMMARY: ==31516== in use at exit: 0 bytes in 0 blocks ==31516== total heap usage: 21 allocs, 21 frees, 13,584 bytes allocated ==31516== ==31516== All heap blocks were freed -- no leaks are possible ==31516== ==31516== For lists of detected and suppressed errors, rerun with: -s ==31516== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
next reply other threads:[~2020-09-01 19:53 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-01 19:53 ajmay81 at googlemail dot com [this message] 2020-09-02 7:06 ` [Bug libfortran/96886] [10 Regression] " marxin at gcc dot gnu.org 2020-09-02 7:42 ` [Bug fortran/96886] " rguenth at gcc dot gnu.org 2020-09-02 7:51 ` marxin at gcc dot gnu.org 2020-09-02 8:04 ` burnus at gcc dot gnu.org 2020-10-31 12:17 ` pault at gcc dot gnu.org 2020-11-02 9:03 ` marxin 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-96886-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).