public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined
@ 2004-10-30 18:46 schwab at suse dot de
2004-10-30 18:47 ` [Bug middle-end/18231] " schwab at suse dot de
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: schwab at suse dot de @ 2004-10-30 18:46 UTC (permalink / raw)
To: gcc-bugs
When a nested inline function calls another nested inline function the latter
is never inlined (even if marked always_inline). This breaks glibc.
void f (void)
{
auto inline __attribute__ ((always_inline)) void h (void) { }
auto inline __attribute__ ((always_inline)) void g (void) { h (); }
g ();
}
--
Summary: [4.0 regression] Nested inline function not inlined
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schwab at suse dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/18231] [4.0 regression] Nested inline function not inlined
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
@ 2004-10-30 18:47 ` schwab at suse dot de
2004-10-30 18:52 ` schwab at suse dot de
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: schwab at suse dot de @ 2004-10-30 18:47 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/18231] [4.0 regression] Nested inline function not inlined
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
2004-10-30 18:47 ` [Bug middle-end/18231] " schwab at suse dot de
@ 2004-10-30 18:52 ` schwab at suse dot de
2004-10-30 19:07 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: schwab at suse dot de @ 2004-10-30 18:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2004-10-30 18:52 -------
The testcase was simplified too much.
int f (int i)
{
auto inline __attribute__ ((always_inline)) int h (int i) { return i; }
auto inline __attribute__ ((always_inline)) int g (void) { return h (i); }
return g ();
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/18231] [4.0 regression] Nested inline function not inlined
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
2004-10-30 18:47 ` [Bug middle-end/18231] " schwab at suse dot de
2004-10-30 18:52 ` schwab at suse dot de
@ 2004-10-30 19:07 ` pinskia at gcc dot gnu dot org
2004-10-30 19:21 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-30 19:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-30 19:07 -------
Confirmed.
This changed between 2004-07-21 and 2004-07-25.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2004-10-30 19:07:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/18231] [4.0 regression] Nested inline function not inlined
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
` (2 preceding siblings ...)
2004-10-30 19:07 ` pinskia at gcc dot gnu dot org
@ 2004-10-30 19:21 ` pinskia at gcc dot gnu dot org
2004-10-30 20:03 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-30 19:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-30 19:21 -------
The problem is that we are introducing an indirection in .generic:
h.0 = h;
D.1126 = h.0 (i);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/18231] [4.0 regression] Nested inline function not inlined
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
` (3 preceding siblings ...)
2004-10-30 19:21 ` pinskia at gcc dot gnu dot org
@ 2004-10-30 20:03 ` pinskia at gcc dot gnu dot org
2004-10-30 20:30 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-30 20:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-30 20:03 -------
Hmm the problem is that ADDR_EXPR of the function is not declared as invariant so we creating a
temprary variable for it. This also caused us to produce much worse code for the following than 3.3
and 3.4.0:
int f (int i)
{
int h (int j) { return i; }
int g (void) { return h (i); }
return g ();
}
Mine, I am posting a patch for it right now.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/18231] [4.0 regression] Nested inline function not inlined
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
` (4 preceding siblings ...)
2004-10-30 20:03 ` pinskia at gcc dot gnu dot org
@ 2004-10-30 20:30 ` pinskia at gcc dot gnu dot org
2004-11-03 19:55 ` cvs-commit at gcc dot gnu dot org
2004-11-03 19:56 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-30 20:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-30 20:30 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg02700.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/18231] [4.0 regression] Nested inline function not inlined
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
` (5 preceding siblings ...)
2004-10-30 20:30 ` pinskia at gcc dot gnu dot org
@ 2004-11-03 19:55 ` cvs-commit at gcc dot gnu dot org
2004-11-03 19:56 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-03 19:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-11-03 19:55 -------
Subject: Bug 18231
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-11-03 19:55:31
Modified files:
gcc : ChangeLog tree.c
Log message:
2004-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/18231
* tree.c (staticp) <case FUNCTION_DECL>: Nested functions are static
also.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6151&r2=2.6152
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.c.diff?cvsroot=gcc&r1=1.443&r2=1.444
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/18231] [4.0 regression] Nested inline function not inlined
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
` (6 preceding siblings ...)
2004-11-03 19:55 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-03 19:56 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-03 19:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-03 19:56 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18231
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-11-03 19:56 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-30 18:46 [Bug middle-end/18231] New: [4.0 regression] Nested inline function not inlined schwab at suse dot de
2004-10-30 18:47 ` [Bug middle-end/18231] " schwab at suse dot de
2004-10-30 18:52 ` schwab at suse dot de
2004-10-30 19:07 ` pinskia at gcc dot gnu dot org
2004-10-30 19:21 ` pinskia at gcc dot gnu dot org
2004-10-30 20:03 ` pinskia at gcc dot gnu dot org
2004-10-30 20:30 ` pinskia at gcc dot gnu dot org
2004-11-03 19:55 ` cvs-commit at gcc dot gnu dot org
2004-11-03 19:56 ` 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).