public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3
       [not found] <20030226135600.9862.danielv@ad-opt.com>
@ 2003-07-11 23:44 ` steven at gcc dot gnu dot org
  2003-07-11 23:57 ` dhazeghi at yahoo dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-07-11 23:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862


steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steven at gcc dot gnu dot
                   |                            |org


------- Additional Comments From steven at gcc dot gnu dot org  2003-07-11 23:44 -------
Wolfgang, is this one really target-specific?  I'd be surprised...


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3
       [not found] <20030226135600.9862.danielv@ad-opt.com>
  2003-07-11 23:44 ` [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3 steven at gcc dot gnu dot org
@ 2003-07-11 23:57 ` dhazeghi at yahoo dot com
  2003-07-12 22:50 ` bangerth at dealii dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-07-11 23:57 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|sparc-sun-solaris2.7        |
   GCC host triplet|sparc-sun-solaris2.7        |
 GCC target triplet|sparc-sun-solaris2.7        |
           Keywords|                            |diagnostic


------- Additional Comments From dhazeghi at yahoo dot com  2003-07-11 23:57 -------
Nope. Confirmed as not target-specific (20030710). Happily reproduced on i686-linux.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3
       [not found] <20030226135600.9862.danielv@ad-opt.com>
  2003-07-11 23:44 ` [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3 steven at gcc dot gnu dot org
  2003-07-11 23:57 ` dhazeghi at yahoo dot com
@ 2003-07-12 22:50 ` bangerth at dealii dot org
  2003-07-12 23:02 ` s dot bosscher at student dot tudelft dot nl
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2003-07-12 22:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862



------- Additional Comments From bangerth at dealii dot org  2003-07-12 22:50 -------
Steven:
I only have x86 to check, so can't say whether something is target-specific :-)
Why do you think I suggested it was?

W.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (2 preceding siblings ...)
  2003-07-12 22:50 ` bangerth at dealii dot org
@ 2003-07-12 23:02 ` s dot bosscher at student dot tudelft dot nl
  2003-07-12 23:50 ` bangerth at dealii dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: s dot bosscher at student dot tudelft dot nl @ 2003-07-12 23:02 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862



------- Additional Comments From s dot bosscher at student dot tudelft dot nl  2003-07-12 23:02 -------
Subject: RE:  [3.3/3.4 regression] spurious warnings with -W -	O3

> Why do you think I suggested it was?

I did not :-)

Can you assign it to me, I'll see if i can find out what is going on here (I
suspect I know what is causing this).


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (3 preceding siblings ...)
  2003-07-12 23:02 ` s dot bosscher at student dot tudelft dot nl
@ 2003-07-12 23:50 ` bangerth at dealii dot org
  2003-07-13  0:00 ` steven at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2003-07-12 23:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (4 preceding siblings ...)
  2003-07-12 23:50 ` bangerth at dealii dot org
@ 2003-07-13  0:00 ` steven at gcc dot gnu dot org
  2003-07-13 11:53 ` [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions steven at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-07-13  0:00 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862



------- Additional Comments From steven at gcc dot gnu dot org  2003-07-13 00:00 -------
This PR is a result of defering functions.  The problem is that in c-decl we
assume that two global variables, current_function_retunrs_value and
current_function_returns_null, are reset for the current function, which is not
true if the function we're expanding is not the function we just parsed.  So for
this test case:

extern int i;
 
static int f(void) {
  if( i ) return 0; else return 1;
}
 
static int trigger(void) {
  if( i ) return; else return 1;
}

the current_function_returns_{value, null} variables have the values they should
have for "trigger" when we expand "f", and we get the warning:

if (extra_warnings
      && current_function_returns_value
      && current_function_returns_null)
    warning ("this function may return with or without a value");

If the two functions in the test case are switched (trigger before f) we get no
warnings at all.

With the rtl inliner we always expanded and then deferred.  With the tree
inliner this is not the case.

To check, I tried GCC 3.2 and indeed it shows the same bug.  Contrary to the
comments in the audit trail, -O3 is not necessary.  Just -O -finline-functions
will trigger the same problem.

I'll work on a fix for this.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (5 preceding siblings ...)
  2003-07-13  0:00 ` steven at gcc dot gnu dot org
@ 2003-07-13 11:53 ` steven at gcc dot gnu dot org
  2003-07-13 20:01 ` pinskia at physics dot uc dot edu
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-07-13 11:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862


steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|steven at gcc dot gnu dot   |
                   |org                         |
           Severity|normal                      |minor
            Summary|[3.3/3.4 regression]        |[3.3/3.4 regression]
                   |spurious warnings with -W - |spurious warnings with -W -
                   |O3                          |finline-functions


------- Additional Comments From steven at gcc dot gnu dot org  2003-07-13 11:53 -------
Patch pending in "http://gcc.gnu.org/ml/gcc-patches/2003-07/msg01286.html"


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (6 preceding siblings ...)
  2003-07-13 11:53 ` [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions steven at gcc dot gnu dot org
@ 2003-07-13 20:01 ` pinskia at physics dot uc dot edu
  2003-07-27 10:31 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-13 20:01 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.1                       |3.3.2


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-13 20:01 -------
Moving target to 3.3.2 based on email from Mark which states he is accepting only fixes 
for ice-on-valid-code and wrong-code patches for 3.3.1 now <http://gcc.gnu.org/ml/gcc-
patches/2003-07/msg01319.html>.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (7 preceding siblings ...)
  2003-07-13 20:01 ` pinskia at physics dot uc dot edu
@ 2003-07-27 10:31 ` steven at gcc dot gnu dot org
  2003-09-06 13:34 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-07-27 10:31 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862


steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|steven at gcc dot gnu dot   |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (8 preceding siblings ...)
  2003-07-27 10:31 ` steven at gcc dot gnu dot org
@ 2003-09-06 13:34 ` cvs-commit at gcc dot gnu dot org
  2003-09-06 14:44 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-06 13:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-09-06 13:34 -------
Subject: Bug 9862

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	steven@gcc.gnu.org	2003-09-06 13:34:00

Modified files:
	gcc            : ChangeLog c-decl.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: 20030906-1.c 20030906-2.c 

Log message:
	PR c/9862
	* c-decl.c (c_expand_body_1): Move return warning from here...
	(finish_function): ...to here.
	
	* gcc.dg/20030906-1.c: New test.
	* gcc.dg/20030906-2.c: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.984&r2=2.985
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.442&r2=1.443
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3028&r2=1.3029
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030906-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030906-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (9 preceding siblings ...)
  2003-09-06 13:34 ` cvs-commit at gcc dot gnu dot org
@ 2003-09-06 14:44 ` cvs-commit at gcc dot gnu dot org
  2003-09-06 14:45 ` steven at gcc dot gnu dot org
  2003-10-01 12:30 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-06 14:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-09-06 14:44 -------
Subject: Bug 9862

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	steven@gcc.gnu.org	2003-09-06 14:44:34

Modified files:
	gcc            : c-decl.c ChangeLog 

Log message:
	PR c/9862
	* c-decl.c (c_expand_body): Move return warning from here...
	(finish_function): ...to here

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.356.2.13&r2=1.356.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.723&r2=1.16114.2.724


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (10 preceding siblings ...)
  2003-09-06 14:44 ` cvs-commit at gcc dot gnu dot org
@ 2003-09-06 14:45 ` steven at gcc dot gnu dot org
  2003-10-01 12:30 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-09-06 14:45 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862


steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From steven at gcc dot gnu dot org  2003-09-06 14:45 -------
Fixed


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions
       [not found] <20030226135600.9862.danielv@ad-opt.com>
                   ` (11 preceding siblings ...)
  2003-09-06 14:45 ` steven at gcc dot gnu dot org
@ 2003-10-01 12:30 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-01 12:30 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9862



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-10-01 12:30 -------
Subject: Bug 9862

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_2-rhl8-branch
Changes by:	jakub@gcc.gnu.org	2003-10-01 12:30:43

Modified files:
	gcc            : ChangeLog c-decl.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: 20030906-1.c 20030906-2.c 

Log message:
	2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
	
	PR c/9862
	* c-decl.c (c_expand_body_1): Move return warning from here...
	(finish_function): ...to here.
	
	* gcc.dg/20030906-1.c: New test.
	* gcc.dg/20030906-2.c: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.13152.2.657.2.27.2.168&r2=1.13152.2.657.2.27.2.169
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.300.2.10.2.1.2.12&r2=1.300.2.10.2.1.2.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.1672.2.166.2.8.2.69&r2=1.1672.2.166.2.8.2.70
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030906-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030906-2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.6.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-10-01 12:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030226135600.9862.danielv@ad-opt.com>
2003-07-11 23:44 ` [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -O3 steven at gcc dot gnu dot org
2003-07-11 23:57 ` dhazeghi at yahoo dot com
2003-07-12 22:50 ` bangerth at dealii dot org
2003-07-12 23:02 ` s dot bosscher at student dot tudelft dot nl
2003-07-12 23:50 ` bangerth at dealii dot org
2003-07-13  0:00 ` steven at gcc dot gnu dot org
2003-07-13 11:53 ` [Bug c/9862] [3.3/3.4 regression] spurious warnings with -W -finline-functions steven at gcc dot gnu dot org
2003-07-13 20:01 ` pinskia at physics dot uc dot edu
2003-07-27 10:31 ` steven at gcc dot gnu dot org
2003-09-06 13:34 ` cvs-commit at gcc dot gnu dot org
2003-09-06 14:44 ` cvs-commit at gcc dot gnu dot org
2003-09-06 14:45 ` steven at gcc dot gnu dot org
2003-10-01 12:30 ` cvs-commit 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).