public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug middle-end/39666] [4.3 Regression] spurious warning with ranged-switch statements [not found] <bug-39666-4@http.gcc.gnu.org/bugzilla/> @ 2011-06-27 12:03 ` rguenth at gcc dot gnu.org 0 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu.org @ 2011-06-27 12:03 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39666 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED Target Milestone|4.3.6 |4.4.2 --- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-27 11:50:35 UTC --- Fixed for 4.4.2. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/39666] New: spurious warning with ranged-switch statements @ 2009-04-06 18:14 dfranke at gcc dot gnu dot org 2009-05-12 16:24 ` [Bug middle-end/39666] [4.3 Regression] " jakub at gcc dot gnu dot org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: dfranke at gcc dot gnu dot org @ 2009-04-06 18:14 UTC (permalink / raw) To: gcc-bugs [Follow-up to http://gcc.gnu.org/ml/gcc/2009-04/msg00175.html] $ cat range.f90 FUNCTION f(n) INTEGER, INTENT(in) :: n REAL :: f SELECT CASE (n) CASE ( :-1); f = -1.0 CASE (0); f = 0.0 CASE (1: ); f = 1.0 END SELECT END FUNCTION $> gfortran-svn -c -O -Wall -fdump-tree-original -fdump-tree-optimized range.f90 range.f90: In function 'f': range.f90:1: warning: '__result_f' may be used uninitialized in this function The dump after optimization shows a 'default' clause that is never reached: <bb 2>: switch (*n;) <default: <L6>, case -2147483648 ... -1: <L7>, case 0: L.3, case 1 ... 2147483647: L.4> If above code is changed to $ cat range.f90 FUNCTION f(n) INTEGER, INTENT(in) :: n REAL :: f SELECT CASE (n) CASE ( :-1); f = 0.0 ! was -1.0 CASE (0); f = 0.0 CASE (1: ); f = 0.0 ! was 1.0 END SELECT END FUNCTION $> gfortran-svn -c -O -Wall -fdump-tree-original -fdump-tree-optimized range.f90 [no warning] The dump after optimization shows: f (integer(kind=4) & n) { <bb 2>: return 0.0; } The initial dump has the same structure for both cases (second case shown): switch (*n) { case -2147483648 ... -1:; __result_f = 0.0; goto L.1; case 0:; __result_f = 0.0; goto L.1; case 1 ... 2147483647:; __result_f = 0.0; goto L.1; } L.1:; In the first case, somewhere during optimization a 'default' is added although the whole range of an INTEGER(kind=4) is covered - which is found in the second case. -- Summary: spurious warning with ranged-switch statements Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dfranke at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39666 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/39666] [4.3 Regression] spurious warning with ranged-switch statements 2009-04-06 18:14 [Bug middle-end/39666] New: " dfranke at gcc dot gnu dot org @ 2009-05-12 16:24 ` jakub at gcc dot gnu dot org 2009-08-04 12:48 ` rguenth at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: jakub at gcc dot gnu dot org @ 2009-05-12 16:24 UTC (permalink / raw) To: gcc-bugs ------- Comment #8 from jakub at gcc dot gnu dot org 2009-05-12 16:24 ------- Fixed for 4.4/4.5 so far. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[4.3/4.4/4.5 Regression] |[4.3 Regression] spurious |spurious warning with |warning with ranged-switch |ranged-switch statements |statements http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39666 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/39666] [4.3 Regression] spurious warning with ranged-switch statements 2009-04-06 18:14 [Bug middle-end/39666] New: " dfranke at gcc dot gnu dot org 2009-05-12 16:24 ` [Bug middle-end/39666] [4.3 Regression] " jakub at gcc dot gnu dot org @ 2009-08-04 12:48 ` rguenth at gcc dot gnu dot org 2009-12-04 22:48 ` dfranke at gcc dot gnu dot org 2010-05-22 18:31 ` rguenth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:48 UTC (permalink / raw) To: gcc-bugs ------- Comment #9 from rguenth at gcc dot gnu dot org 2009-08-04 12:30 ------- GCC 4.3.4 is being released, adjusting target milestone. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.3.4 |4.3.5 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39666 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/39666] [4.3 Regression] spurious warning with ranged-switch statements 2009-04-06 18:14 [Bug middle-end/39666] New: " dfranke at gcc dot gnu dot org 2009-05-12 16:24 ` [Bug middle-end/39666] [4.3 Regression] " jakub at gcc dot gnu dot org 2009-08-04 12:48 ` rguenth at gcc dot gnu dot org @ 2009-12-04 22:48 ` dfranke at gcc dot gnu dot org 2010-05-22 18:31 ` rguenth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: dfranke at gcc dot gnu dot org @ 2009-12-04 22:48 UTC (permalink / raw) To: gcc-bugs ------- Comment #10 from dfranke at gcc dot gnu dot org 2009-12-04 22:47 ------- Jakub, do you still plan to bring this to 4.3? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39666 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/39666] [4.3 Regression] spurious warning with ranged-switch statements 2009-04-06 18:14 [Bug middle-end/39666] New: " dfranke at gcc dot gnu dot org ` (2 preceding siblings ...) 2009-12-04 22:48 ` dfranke at gcc dot gnu dot org @ 2010-05-22 18:31 ` rguenth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:31 UTC (permalink / raw) To: gcc-bugs ------- Comment #11 from rguenth at gcc dot gnu dot org 2010-05-22 18:13 ------- GCC 4.3.5 is being released, adjusting target milestone. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.3.5 |4.3.6 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39666 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-27 12:03 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-39666-4@http.gcc.gnu.org/bugzilla/> 2011-06-27 12:03 ` [Bug middle-end/39666] [4.3 Regression] spurious warning with ranged-switch statements rguenth at gcc dot gnu.org 2009-04-06 18:14 [Bug middle-end/39666] New: " dfranke at gcc dot gnu dot org 2009-05-12 16:24 ` [Bug middle-end/39666] [4.3 Regression] " jakub at gcc dot gnu dot org 2009-08-04 12:48 ` rguenth at gcc dot gnu dot org 2009-12-04 22:48 ` dfranke at gcc dot gnu dot org 2010-05-22 18:31 ` rguenth at gcc dot gnu dot org
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).