public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12180] New: Inline optimization for variadic function fails for sparc* targets
@ 2003-09-05 10:36 martin at netbsd dot org
2003-09-07 2:40 ` [Bug target/12180] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: martin at netbsd dot org @ 2003-09-05 10:36 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=12180
Summary: Inline optimization for variadic function fails for
sparc* targets
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin at netbsd dot org
CC: gcc-bugs at gcc dot gnu dot org,martin at netbsd dot org
GCC build triplet: sparc64--netbsd
GCC host triplet: sparc64--netbsd
GCC target triplet: sparc64--netbsd
I noticed this when trying to build mpg123 on NetBSD/sparc64. Matthew Green and
I reduced it to a small example code:
Store this in test.c:
--8<--
typedef char * va_list;
void generic_sendmsg (char *fmt, ...)
{
va_list ap;
(void)(__builtin_next_arg(fmt), (ap) = (va_list)__builtin_saveregs());
}
void generic_sendstat()
{
double t;
generic_sendmsg("F %3.2f", t);
}
-->8--
Then try:
$ cc -c -O3 test.c
test.c: In function `generic_sendstat':
test.c:7: error: `va_start' used in function with fixed args
$
But:
$ cc -c -O3 -fno-inline test.c
$
The problem does not happen for non-sparc targets (AFAICT)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/12180] Inline optimization for variadic function fails for sparc* targets
2003-09-05 10:36 [Bug c/12180] New: Inline optimization for variadic function fails for sparc* targets martin at netbsd dot org
@ 2003-09-07 2:40 ` pinskia at gcc dot gnu dot org
2003-09-07 20:45 ` petrov at netbsd dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-07 2:40 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=12180
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
Keywords| |rejects-valid
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-07 02:40 -------
Is this a regression?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/12180] Inline optimization for variadic function fails for sparc* targets
2003-09-05 10:36 [Bug c/12180] New: Inline optimization for variadic function fails for sparc* targets martin at netbsd dot org
2003-09-07 2:40 ` [Bug target/12180] " pinskia at gcc dot gnu dot org
@ 2003-09-07 20:45 ` petrov at netbsd dot org
2003-09-08 6:16 ` [Bug target/12180] [3.3/3.4 regression] Inline optimization fails for variadic function ebotcazou at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: petrov at netbsd dot org @ 2003-09-07 20: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=12180
------- Additional Comments From petrov at netbsd dot org 2003-09-07 20:45 -------
gcc 3.2.3 as
Reading specs from /work/gcc323/lib/gcc-lib/sparc64--netbsd/3.2.3/specs
Configured with: ../gcc/configure --prefix=/work/gcc323
--enable-languages=c,c++,objc --enable-nls=no --disable-shared sparc64--netbsd
Thread model: single
gcc version 3.2.3
also gives the same result
$ /work/gcc323/bin/gcc -c -O3 vatest.c
vatest.c: In function `generic_sendstat':
vatest.c:7: `va_start' used in function with fixed args
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/12180] [3.3/3.4 regression] Inline optimization fails for variadic function
2003-09-05 10:36 [Bug c/12180] New: Inline optimization for variadic function fails for sparc* targets martin at netbsd dot org
2003-09-07 2:40 ` [Bug target/12180] " pinskia at gcc dot gnu dot org
2003-09-07 20:45 ` petrov at netbsd dot org
@ 2003-09-08 6:16 ` ebotcazou at gcc dot gnu dot org
2003-10-03 0:23 ` [Bug optimization/12180] " cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2003-09-08 6:16 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=12180
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|sparc64--netbsd |
GCC host triplet|sparc64--netbsd |
GCC target triplet|sparc64--netbsd |
Last reconfirmed|0000-00-00 00:00:00 |2003-09-08 06:16:24
date| |
Summary|Inline optimization for |[3.3/3.4 regression] Inline
|variadic function fails for |optimization fails for
|sparc* targets |variadic function
Target Milestone|--- |3.3.2
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2003-09-08 06:16 -------
Confirmed on i586-redhat-linux-gnu as of 3.3.2 20030904 (prerelease) with:
void generic_sendmsg (char *fmt, ...)
{
__builtin_next_arg(fmt);
}
void generic_sendstat()
{
double t;
generic_sendmsg("F %3.2f", t);
}
% gcc-3.3.2 -O3 pr12180.c
pr12180.c: In function `generic_sendstat':
pr12180.c:5: error: `va_start' used in function with fixed args
This is a regression from GCC 3.0.4.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug optimization/12180] [3.3/3.4 regression] Inline optimization fails for variadic function
2003-09-05 10:36 [Bug c/12180] New: Inline optimization for variadic function fails for sparc* targets martin at netbsd dot org
` (2 preceding siblings ...)
2003-09-08 6:16 ` [Bug target/12180] [3.3/3.4 regression] Inline optimization fails for variadic function ebotcazou at gcc dot gnu dot org
@ 2003-10-03 0:23 ` cvs-commit at gcc dot gnu dot org
2003-10-03 0:37 ` cvs-commit at gcc dot gnu dot org
2003-10-03 1:13 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-03 0:23 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=12180
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-10-03 00:23 -------
Subject: Bug 12180
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2003-10-03 00:23:30
Modified files:
gcc : ChangeLog tree-inline.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: 20031002-1.c
Log message:
PR optimization/12180
* tree-inline.c (inline_forbidden_p_1): Do not permit inlining of
functions containing calls to
PR optimization/12180
* gcc.dg/20031002-1.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1263&r2=2.1264
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-inline.c.diff?cvsroot=gcc&r1=1.81&r2=1.82
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3092&r2=1.3093
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20031002-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug optimization/12180] [3.3/3.4 regression] Inline optimization fails for variadic function
2003-09-05 10:36 [Bug c/12180] New: Inline optimization for variadic function fails for sparc* targets martin at netbsd dot org
` (3 preceding siblings ...)
2003-10-03 0:23 ` [Bug optimization/12180] " cvs-commit at gcc dot gnu dot org
@ 2003-10-03 0:37 ` cvs-commit at gcc dot gnu dot org
2003-10-03 1:13 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-03 0:37 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=12180
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-10-03 00:37 -------
Subject: Bug 12180
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: mmitchel@gcc.gnu.org 2003-10-03 00:36:57
Modified files:
gcc : ChangeLog c-objc-common.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: 20031002-1.c
Log message:
PR optimization/12180
* tree-inline.c (inline_forbidden_p_1): Do not permit inlining of
functions containing calls to
PR optimization/12180
* gcc.dg/20031002-1.c: New test.
Patches:
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.765&r2=1.16114.2.766
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-objc-common.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.18.4.1&r2=1.18.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.294&r2=1.2261.2.295
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20031002-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.2.2.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug optimization/12180] [3.3/3.4 regression] Inline optimization fails for variadic function
2003-09-05 10:36 [Bug c/12180] New: Inline optimization for variadic function fails for sparc* targets martin at netbsd dot org
` (4 preceding siblings ...)
2003-10-03 0:37 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-03 1:13 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-03 1:13 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=12180
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-03 01:13 -------
Fixed in 3.3.2 and the mainline.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-10-03 1:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-05 10:36 [Bug c/12180] New: Inline optimization for variadic function fails for sparc* targets martin at netbsd dot org
2003-09-07 2:40 ` [Bug target/12180] " pinskia at gcc dot gnu dot org
2003-09-07 20:45 ` petrov at netbsd dot org
2003-09-08 6:16 ` [Bug target/12180] [3.3/3.4 regression] Inline optimization fails for variadic function ebotcazou at gcc dot gnu dot org
2003-10-03 0:23 ` [Bug optimization/12180] " cvs-commit at gcc dot gnu dot org
2003-10-03 0:37 ` cvs-commit at gcc dot gnu dot org
2003-10-03 1:13 ` 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).