public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function
@ 2003-11-10 23:07 cheng at powertv dot com
  2003-11-10 23:13 ` [Bug optimization/13000] " pinskia at gcc dot gnu dot org
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: cheng at powertv dot com @ 2003-11-10 23:07 UTC (permalink / raw)
  To: gcc-bugs

In the following contrived code snippet, gcc 2.953 will not complain about the 
function not returning a value despite its function signature says so when 
compiling with optimizations enabled (e.g. -O1 or -O2).  Disabling 
optimizations with -O0 will enable the compiler to display an appropriate error 
message.  This problem appears in both C and C++ test code.


typedef int ui32;

static ui32 AddPrimitiveDvrResource(ui32 hSession, ui32 *pSessNode,
									
	void *pvResourceDescriptor, ui32 dwSize);

static ui32 AddPrimitiveDvrResource(ui32 hSession, ui32 *pSessNode,
									
	void *pvResourceDescriptor, ui32 dwSize)
{
	ui32 rc;

	if (dwSize != 32)
	{
		rc = 0;
	}
	else
	{
		// set the DVR ID in the session node even if subsequent steps 
fail
		
		if (dwSize) 
		{
			rc = dwSize;
		}
		else
		{
			if (!pSessNode)
			{
				rc = 2;
			}
			else
			{
				ui32 dwTranscryptorAvrID = 0;
	
				if (rc = dwTranscryptorAvrID)
				{
					dwTranscryptorAvrID;
				}
				else
				{
					ui32 dk;

					if (rc = 16)
					{
						dk = rc;
					}
					else
					{
						if (dk) 
						{
							rc = 1;
						}
						else
						{
							rc = 0;
						}
					}
				}
			}
		}
	}
}

int main(int argc, char **argv)
{
	int result = AddPrimitiveDvrResource(0,0,0,0);

	return 0;
}

-- 
           Summary: Using -Ox cannot detect missing return statement in a
                    function
           Product: gcc
           Version: 2.95.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cheng at powertv dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug optimization/13000] Using -Ox cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
@ 2003-11-10 23:13 ` pinskia at gcc dot gnu dot org
  2003-11-10 23:29 ` falk dot hueffner at student dot uni-tuebingen dot de
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-10 23:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-10 23:13 -------
Been fixed since at least 3.1.

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


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


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

* [Bug optimization/13000] Using -Ox cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
  2003-11-10 23:13 ` [Bug optimization/13000] " pinskia at gcc dot gnu dot org
@ 2003-11-10 23:29 ` falk dot hueffner at student dot uni-tuebingen dot de
  2003-11-10 23:36 ` [Bug optimization/13000] [tree-ssa] " pinskia at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: falk dot hueffner at student dot uni-tuebingen dot de @ 2003-11-10 23:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From falk dot hueffner at student dot uni-tuebingen dot de  2003-11-10 23:29 -------
Subject: Re:  Using -Ox cannot detect missing return statement in a function

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> ------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-10 23:13 -------
> Been fixed since at least 3.1.

Seems to be back in tree-ssa though (warning at -O0, -O1 and -O3, but
not at -O2, weird).  Unfortunately, I don't have a mainline compiler
to check right now.



-- 


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


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

* [Bug optimization/13000] [tree-ssa] Using -Ox cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
  2003-11-10 23:13 ` [Bug optimization/13000] " pinskia at gcc dot gnu dot org
  2003-11-10 23:29 ` falk dot hueffner at student dot uni-tuebingen dot de
@ 2003-11-10 23:36 ` pinskia at gcc dot gnu dot org
  2003-11-11  0:20 ` pinskia at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-10 23:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-10 23:36 -------
Reopening based on Falk's tree-ssa problem.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
           Keywords|                            |diagnostic
         Resolution|FIXED                       |
            Summary|Using -Ox cannot detect     |[tree-ssa] Using -Ox cannot
                   |missing return statement in |detect missing return
                   |a function                  |statement in a function
   Target Milestone|---                         |tree-ssa


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


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

* [Bug optimization/13000] [tree-ssa] Using -Ox cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (2 preceding siblings ...)
  2003-11-10 23:36 ` [Bug optimization/13000] [tree-ssa] " pinskia at gcc dot gnu dot org
@ 2003-11-11  0:20 ` pinskia at gcc dot gnu dot org
  2003-11-19 15:05 ` steven at gcc dot gnu dot org
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-11  0:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-11-11 00:20:32
               date|                            |


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


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

* [Bug optimization/13000] [tree-ssa] Using -Ox cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (3 preceding siblings ...)
  2003-11-11  0:20 ` pinskia at gcc dot gnu dot org
@ 2003-11-19 15:05 ` steven at gcc dot gnu dot org
  2003-12-01  4:34 ` [Bug optimization/13000] [3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-11-19 15:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |13127
              nThis|                            |


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


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

* [Bug optimization/13000] [3.4 Regression] Using -Ox cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (4 preceding siblings ...)
  2003-11-19 15:05 ` steven at gcc dot gnu dot org
@ 2003-12-01  4:34 ` pinskia at gcc dot gnu dot org
  2003-12-25  0:27 ` [Bug optimization/13000] [3.4 Regression] Using -O2 " pinskia at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-01  4:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-01 04:34 -------
I can also reproduce this on the mainline (20031119).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-11-11 00:20:32         |2003-12-01 04:34:28
               date|                            |
            Summary|[tree-ssa] Using -Ox cannot |[3.4 Regression] Using -Ox
                   |detect missing return       |cannot detect missing return
                   |statement in a function     |statement in a function
   Target Milestone|tree-ssa                    |3.4
            Version|tree-ssa                    |3.4


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


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

* [Bug optimization/13000] [3.4 Regression] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (5 preceding siblings ...)
  2003-12-01  4:34 ` [Bug optimization/13000] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2003-12-25  0:27 ` pinskia at gcc dot gnu dot org
  2003-12-25  0:39 ` [Bug optimization/13000] [3.4 Regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-25  0:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-25 00:10 -------
>From Phil's regression hunter:
: Search converges between 2003-09-04-trunk (#391) and 2003-09-05-trunk (#392).
Before that GCC gave at -O2:
input.c: In function `AddPrimitiveDvrResource':
input.c:41: warning: statement with no effect
input.c:10: warning: unused parameter 'hSession'
input.c:12: warning: unused parameter 'pvResourceDescriptor'


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-12-01 04:34:28         |2003-12-25 00:10:12
               date|                            |
            Summary|[3.4 Regression] Using -Ox  |[3.4 Regression] Using -O2
                   |cannot detect missing return|cannot detect missing return
                   |statement in a function     |statement in a function


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


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

* [Bug optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (6 preceding siblings ...)
  2003-12-25  0:27 ` [Bug optimization/13000] [3.4 Regression] Using -O2 " pinskia at gcc dot gnu dot org
@ 2003-12-25  0:39 ` pinskia at gcc dot gnu dot org
  2003-12-25 16:21 ` hubicka at ucw dot cz
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-25  0:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-25 00:22 -------
It also works with -fno-unit-at-a-time or with -O3.
Jan could look into what causes this?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |hubicka at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
            Summary|[3.4 Regression] Using -O2  |[3.4 Regression] [unit-at-a-
                   |cannot detect missing return|time] Using -O2 cannot
                   |statement in a function     |detect missing return
                   |                            |statement in a function


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


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

* [Bug optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (7 preceding siblings ...)
  2003-12-25  0:39 ` [Bug optimization/13000] [3.4 Regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
@ 2003-12-25 16:21 ` hubicka at ucw dot cz
  2003-12-29 18:14 ` pinskia at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: hubicka at ucw dot cz @ 2003-12-25 16:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hubicka at ucw dot cz  2003-12-25 16:05 -------
Subject: Re:  [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function

> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-25 00:22 -------
> It also works with -fno-unit-at-a-time or with -O3.
> Jan could look into what causes this?

This is caused by a fact that we either fully inline or decide to not
compile function at all.  Because the warning come from the brackend, we
never notice it.  This is kind of problem we had all the time, just it
is more common now.  I hope to do something about it in a tree-ssa
branch.

Honza
> 
> -- 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>          AssignedTo|unassigned at gcc dot gnu   |hubicka at gcc dot gnu dot
>                    |dot org                     |org
>              Status|NEW                         |ASSIGNED
>             Summary|[3.4 Regression] Using -O2  |[3.4 Regression] [unit-at-a-
>                    |cannot detect missing return|time] Using -O2 cannot
>                    |statement in a function     |detect missing return
>                    |                            |statement in a function
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13000
> 
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.


-- 


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


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

* [Bug optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (8 preceding siblings ...)
  2003-12-25 16:21 ` hubicka at ucw dot cz
@ 2003-12-29 18:14 ` pinskia at gcc dot gnu dot org
  2004-01-03 21:21 ` hubicka at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-29 18:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


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


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

* [Bug optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (9 preceding siblings ...)
  2003-12-29 18:14 ` pinskia at gcc dot gnu dot org
@ 2004-01-03 21:21 ` hubicka at gcc dot gnu dot org
  2004-02-14 21:21 ` [Bug optimization/13000] [3.4/3.5 " pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2004-01-03 21:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hubicka at gcc dot gnu dot org  2004-01-03 21:21 -------
Needs the analysis done before inlining

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.0                       |tree-ssa


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


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

* [Bug optimization/13000] [3.4/3.5 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (10 preceding siblings ...)
  2004-01-03 21:21 ` hubicka at gcc dot gnu dot org
@ 2004-02-14 21:21 ` pinskia at gcc dot gnu dot org
  2004-08-18  7:35 ` [Bug tree-optimization/13000] " rth at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-14 21:21 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|tree-ssa                    |3.5.0


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


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

* [Bug tree-optimization/13000] [3.4/3.5 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (11 preceding siblings ...)
  2004-02-14 21:21 ` [Bug optimization/13000] [3.4/3.5 " pinskia at gcc dot gnu dot org
@ 2004-08-18  7:35 ` rth at gcc dot gnu dot org
  2004-11-21 14:10 ` [Bug tree-optimization/13000] [3.4/4.0 " pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-08-18  7:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-08-18 07:35 -------
Looking at it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|hubicka at gcc dot gnu dot  |rth at gcc dot gnu dot org
                   |org                         |


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


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

* [Bug tree-optimization/13000] [3.4/4.0 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (12 preceding siblings ...)
  2004-08-18  7:35 ` [Bug tree-optimization/13000] " rth at gcc dot gnu dot org
@ 2004-11-21 14:10 ` pinskia at gcc dot gnu dot org
  2005-01-18  0:40 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-21 14:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-21 14:10 -------
*** Bug 18588 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


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


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

* [Bug tree-optimization/13000] [3.4/4.0 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (13 preceding siblings ...)
  2004-11-21 14:10 ` [Bug tree-optimization/13000] [3.4/4.0 " pinskia at gcc dot gnu dot org
@ 2005-01-18  0:40 ` pinskia at gcc dot gnu dot org
  2005-01-19 15:51 ` ian at airs dot com
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-18  0:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-18 00:39 -------
Hmm, This seems like a place where the tree-profiling branch can come in handing as we always 
produce the CFG for all functions even the ones which we inline and don't emit.

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


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


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

* [Bug tree-optimization/13000] [3.4/4.0 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (14 preceding siblings ...)
  2005-01-18  0:40 ` pinskia at gcc dot gnu dot org
@ 2005-01-19 15:51 ` ian at airs dot com
  2005-01-21  2:52 ` ian at airs dot com
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ian at airs dot com @ 2005-01-19 15:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at airs dot com  2005-01-19 15:51 -------
Proposed patch: http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01223.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug tree-optimization/13000] [3.4/4.0 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (15 preceding siblings ...)
  2005-01-19 15:51 ` ian at airs dot com
@ 2005-01-21  2:52 ` ian at airs dot com
  2005-01-21 19:06 ` cvs-commit at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ian at airs dot com @ 2005-01-21  2:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at airs dot com  2005-01-21 02:52 -------
Updated patch: http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01443.html

-- 


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


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

* [Bug tree-optimization/13000] [3.4/4.0 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (16 preceding siblings ...)
  2005-01-21  2:52 ` ian at airs dot com
@ 2005-01-21 19:06 ` cvs-commit at gcc dot gnu dot org
  2005-01-21 19:06 ` cvs-commit at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-21 19:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-01-21 19:06 -------
Subject: Bug 13000

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ian@gcc.gnu.org	2005-01-21 19:05:54

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gcc.dg: 20040206-1.c 

Log message:
	PR tree-optimization/13000
	* gcc.dg/20040206-1.c: Change warning to point where function is
	being inlined.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4917&r2=1.4918
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20040206-1.c.diff?cvsroot=gcc&r1=1.4&r2=1.5



-- 


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


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

* [Bug tree-optimization/13000] [3.4/4.0 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (17 preceding siblings ...)
  2005-01-21 19:06 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-21 19:06 ` cvs-commit at gcc dot gnu dot org
  2005-01-21 19:07 ` [Bug tree-optimization/13000] [3.4 " ian at airs dot com
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-21 19:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-01-21 19:05 -------
Subject: Bug 13000

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ian@gcc.gnu.org	2005-01-21 19:05:25

Modified files:
	gcc            : ChangeLog tree-inline.c tree-cfg.c gimple-low.c 
	                 gimplify.c c-typeck.c 

Log message:
	PR tree-optimization/13000
	* tree-inline.c: Include "tree-flow.h".
	(expand_call_inline): If warn_return_type, warn if non-void inline
	function falls through.
	* tree-cfg.c (execute_warn_function_return): Don't warn about
	control reaching end if TREE_NO_WARNING is set.  Set
	TREE_NO_WARNING.
	* gimple-low.c (block_may_fallthru): Don't assume that SWITCH_EXPR
	has been lowered.
	* gimplify.c (shortcut_cond_expr): Don't emit a jump over the else
	branch if we don't need one.
	* c-typeck.c: Include "tree-flow.h"
	(c_finish_bc_stmt): Don't add a goto if the current statement
	list doesn't fall through to the current point.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7221&r2=2.7222
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-inline.c.diff?cvsroot=gcc&r1=1.166&r2=1.167
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&r1=2.144&r2=2.145
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimple-low.c.diff?cvsroot=gcc&r1=2.17&r2=2.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.104&r2=2.105
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.411&r2=1.412



-- 


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


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

* [Bug tree-optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (18 preceding siblings ...)
  2005-01-21 19:06 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-21 19:07 ` ian at airs dot com
  2005-01-21 19:14 ` ian at airs dot com
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ian at airs dot com @ 2005-01-21 19:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at airs dot com  2005-01-21 19:07 -------
Fixed on mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.0.0 3.4.0                 |3.4.0
      Known to work|3.3                         |3.3 4.0.0
            Summary|[3.4/4.0 Regression] [unit- |[3.4 Regression] [unit-at-a-
                   |at-a-time] Using -O2 cannot |time] Using -O2 cannot
                   |detect missing return       |detect missing return
                   |statement in a function     |statement in a function
   Target Milestone|4.0.0                       |3.4.4


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


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

* [Bug tree-optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (19 preceding siblings ...)
  2005-01-21 19:07 ` [Bug tree-optimization/13000] [3.4 " ian at airs dot com
@ 2005-01-21 19:14 ` ian at airs dot com
  2005-01-27  1:58 ` rth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: ian at airs dot com @ 2005-01-21 19:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at airs dot com  2005-01-21 19:14 -------
Note that if we do move to a better solution, i.e., building a CFG for inline
functions, we should remove the patch to c_finish_bc_stmt in c-typeck.c.  It
prevents -Wunreachable from ever warning about an unreachable break or continue
statement (we currently do not issue a warning about those statements anyhow).

We may want to consider removing the patch to shortcut_cond_expr in gimplify.c,
although that one is relatively harmless.

And of course if we build a CFG, we should adjust the patch to
expand_call_inline, although that will probably be pretty obvious.

See the e-mail thread starting here:
    http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01223.html

-- 


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


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

* [Bug tree-optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (20 preceding siblings ...)
  2005-01-21 19:14 ` ian at airs dot com
@ 2005-01-27  1:58 ` rth at gcc dot gnu dot org
  2005-04-12 17:35 ` giovannibajo at libero dot it
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-01-27  1:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2005-01-27 01:58 -------
I am uninterested in fixing this for 3.4.

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


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


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

* [Bug tree-optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (21 preceding siblings ...)
  2005-01-27  1:58 ` rth at gcc dot gnu dot org
@ 2005-04-12 17:35 ` giovannibajo at libero dot it
  2005-04-12 18:49 ` ian at airs dot com
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2005-04-12 17:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2005-04-12 17:35 -------
Since this bug was fixed in 4.1, I'm removing the dependencies with the 4.1 
metabug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|17652                       |
              nThis|                            |


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


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

* [Bug tree-optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (22 preceding siblings ...)
  2005-04-12 17:35 ` giovannibajo at libero dot it
@ 2005-04-12 18:49 ` ian at airs dot com
  2005-05-19 17:49 ` mmitchel at gcc dot gnu dot org
  2005-09-05 15:48 ` pinskia at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: ian at airs dot com @ 2005-04-12 18:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at airs dot com  2005-04-12 18:49 -------
The dependency on 17652 is there because of comment #17, q.v.  We want to make
sure that we back out the patch to c_finish_bc_stmt when it is no longer needed,
which should happen after the tree-profiling branch is merged to mainline.  So
I'm re-adding the dependency.  If you still think this is wrong, go ahead and
take it out.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |17652
              nThis|                            |


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


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

* [Bug tree-optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (23 preceding siblings ...)
  2005-04-12 18:49 ` ian at airs dot com
@ 2005-05-19 17:49 ` mmitchel at gcc dot gnu dot org
  2005-09-05 15:48 ` pinskia at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:49 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.4                       |3.4.5


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


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

* [Bug tree-optimization/13000] [3.4 Regression] [unit-at-a-time] Using -O2 cannot detect missing return statement in a function
  2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
                   ` (24 preceding siblings ...)
  2005-05-19 17:49 ` mmitchel at gcc dot gnu dot org
@ 2005-09-05 15:48 ` pinskia at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-05 15:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-05 15:48 -------
(In reply to comment #20)
> The dependency on 17652 is there because of comment #17, q.v.  We want to make
> sure that we back out the patch to c_finish_bc_stmt when it is no longer needed,
> which should happen after the tree-profiling branch is merged to mainline.  So
> I'm re-adding the dependency.  If you still think this is wrong, go ahead and
> take it out.

Removing dependent on 13127 because the patch to c_finish_bc_stmt still speeds up the compiling as 
we don't need to generate as many BBs with it as we would without it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|17652                       |
              nThis|                            |


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


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

end of thread, other threads:[~2005-09-05 15:48 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-10 23:07 [Bug optimization/13000] New: Using -Ox cannot detect missing return statement in a function cheng at powertv dot com
2003-11-10 23:13 ` [Bug optimization/13000] " pinskia at gcc dot gnu dot org
2003-11-10 23:29 ` falk dot hueffner at student dot uni-tuebingen dot de
2003-11-10 23:36 ` [Bug optimization/13000] [tree-ssa] " pinskia at gcc dot gnu dot org
2003-11-11  0:20 ` pinskia at gcc dot gnu dot org
2003-11-19 15:05 ` steven at gcc dot gnu dot org
2003-12-01  4:34 ` [Bug optimization/13000] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-12-25  0:27 ` [Bug optimization/13000] [3.4 Regression] Using -O2 " pinskia at gcc dot gnu dot org
2003-12-25  0:39 ` [Bug optimization/13000] [3.4 Regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
2003-12-25 16:21 ` hubicka at ucw dot cz
2003-12-29 18:14 ` pinskia at gcc dot gnu dot org
2004-01-03 21:21 ` hubicka at gcc dot gnu dot org
2004-02-14 21:21 ` [Bug optimization/13000] [3.4/3.5 " pinskia at gcc dot gnu dot org
2004-08-18  7:35 ` [Bug tree-optimization/13000] " rth at gcc dot gnu dot org
2004-11-21 14:10 ` [Bug tree-optimization/13000] [3.4/4.0 " pinskia at gcc dot gnu dot org
2005-01-18  0:40 ` pinskia at gcc dot gnu dot org
2005-01-19 15:51 ` ian at airs dot com
2005-01-21  2:52 ` ian at airs dot com
2005-01-21 19:06 ` cvs-commit at gcc dot gnu dot org
2005-01-21 19:06 ` cvs-commit at gcc dot gnu dot org
2005-01-21 19:07 ` [Bug tree-optimization/13000] [3.4 " ian at airs dot com
2005-01-21 19:14 ` ian at airs dot com
2005-01-27  1:58 ` rth at gcc dot gnu dot org
2005-04-12 17:35 ` giovannibajo at libero dot it
2005-04-12 18:49 ` ian at airs dot com
2005-05-19 17:49 ` mmitchel at gcc dot gnu dot org
2005-09-05 15:48 ` pinskia 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).