public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "P dot Schaffnit at access dot rwth-aachen dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/28200] New: One warning seems to appear only with '-O2' even though '-Wall' is specified Date: Thu, 29 Jun 2006 11:42:00 -0000 [thread overview] Message-ID: <bug-28200-10601@http.gcc.gnu.org/bugzilla/> (raw) Hi! It might be poorly understanding something, but I am under the impression that some warning from '-Wall' only appear in conjunction with '-O2'. Here is a simplified case which seems to exhibit this behaviour: do not look for much meaning, in this very case the warning turns out to be a bit unecessary, but no way the compiler could figure that out. Anyway, this is just one example, and I believe that to be systematic. It might be nice at some point if someone could fix that, but it's only compilation diagnostics after all... Thanks! Philippe PS: some sources which trigger this behaviour: ! SUBROUTINE Check ( Number ) ! IMPLICIT NONE INTEGER :: Value INTEGER, INTENT(IN) :: Number ! SELECT CASE ( Number ) CASE ( 1 ) Value = 11 CASE ( 2 ) Value = 12 CASE ( 3 ) Value = 13 CASE DEFAULT CALL Some_Routine_Performing_Orderly_Stop END SELECT IF ( Value .LT. 0 ) THEN CALL Some_Routine_Issueing_Some_Warnings CALL Some_Routine_Performing_Orderly_Stop ENDIF ! RETURN END SUBROUTINE Check ! PPS: what I get compiling that: gfortran -O2 -g -Wall -c Sources.f90 Sources.f90: In function 'check': Sources.f90:18: warning: 'value' is used uninitialized in this function whereas 'gfortran -g -Wall -c Sources.f90' gives no warning of any kind PPPS: my build is not up to date but still relatively recent: Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /USER/philippe/Irix/Gcc_Sources/configure --prefix=/WORK/philippe/Tools/Gcc --enable-languages=c,fortran --disable-maintainer-mode --disable-shared --with-mpfr=/WORK/philippe/Tools/Mpfr --with-gmp=/WORK/philippe/Tools/Gmp Thread model: posix gcc version 4.2.0 20060626 (experimental) -- Summary: One warning seems to appear only with '-O2' even though '-Wall' is specified Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: P dot Schaffnit at access dot rwth-aachen dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28200
next reply other threads:[~2006-06-29 11:42 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-06-29 11:42 P dot Schaffnit at access dot rwth-aachen dot de [this message] 2006-06-29 13:09 ` [Bug fortran/28200] " pinskia at gcc dot gnu dot 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-28200-10601@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).