public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/21062] New: Incorrect declaration of printf() in alias2.C
@ 2005-04-16 22:04 oyvind dot harboe at zylin dot com
2005-04-16 22:05 ` [Bug testsuite/21062] " oyvind dot harboe at zylin dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2005-04-16 22:04 UTC (permalink / raw)
To: gcc-bugs
See attached patch.
My GCC superpowers aren't quite up to analyzing this, but I suppose this would
cause problems for e.g. the i2pk target as it would receive size=0 in its
arguments in the function below.
If this can't be sorted out by trivial inspection, please let me know and I'll
run some tests.
/* Returns the number of bytes of arguments automatically
popped when returning from a subroutine call.
FUNDECL is the declaration node of the function (as a tree),
FUNTYPE is the data type of the function (as a tree),
or for a library call it is an identifier node for the subroutine name.
SIZE is the number of bytes of arguments passed on the stack. */
int
ip2k_return_pops_args (tree fundecl ATTRIBUTE_UNUSED, tree funtype, int size)
{
if (TREE_CODE (funtype) == IDENTIFIER_NODE)
return size;
if (TYPE_ARG_TYPES (funtype) == NULL_TREE
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (funtype))) == void_type_node))
return size;
return 0;
}
--
Summary: Incorrect declaration of printf() in alias2.C
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: testsuite
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: oyvind dot harboe at zylin dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21062
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/21062] Incorrect declaration of printf() in alias2.C
2005-04-16 22:04 [Bug testsuite/21062] New: Incorrect declaration of printf() in alias2.C oyvind dot harboe at zylin dot com
@ 2005-04-16 22:05 ` oyvind dot harboe at zylin dot com
2005-04-17 9:43 ` oyvind dot harboe at zylin dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2005-04-16 22:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From oyvind dot harboe at zylin dot com 2005-04-16 22:05 -------
Created an attachment (id=8661)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8661&action=view)
Fixes declaration of printf()
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21062
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/21062] Incorrect declaration of printf() in alias2.C
2005-04-16 22:04 [Bug testsuite/21062] New: Incorrect declaration of printf() in alias2.C oyvind dot harboe at zylin dot com
2005-04-16 22:05 ` [Bug testsuite/21062] " oyvind dot harboe at zylin dot com
@ 2005-04-17 9:43 ` oyvind dot harboe at zylin dot com
2005-04-25 18:23 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: oyvind dot harboe at zylin dot com @ 2005-04-17 9:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From oyvind dot harboe at zylin dot com 2005-04-17 09:43 -------
I searched for 'extern "C" int printf' in the testsuite and all the other
declarations I saw are in line with my patch.
However, I believe that it is worth taking a cursory look at the ip2k function
ip2k_return_pops_args to see if a declaration like "void foo(...)" breaks it.
I'm no varargs expert, but can varargs work without a first fixed argument?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21062
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/21062] Incorrect declaration of printf() in alias2.C
2005-04-16 22:04 [Bug testsuite/21062] New: Incorrect declaration of printf() in alias2.C oyvind dot harboe at zylin dot com
2005-04-16 22:05 ` [Bug testsuite/21062] " oyvind dot harboe at zylin dot com
2005-04-17 9:43 ` oyvind dot harboe at zylin dot com
@ 2005-04-25 18:23 ` pinskia at gcc dot gnu dot org
2005-04-25 18:29 ` cvs-commit at gcc dot gnu dot org
2005-04-25 18:29 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-25 18:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-25 18:23 -------
Confirmed, I am taking care of this.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-04-25 18:23:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21062
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/21062] Incorrect declaration of printf() in alias2.C
2005-04-16 22:04 [Bug testsuite/21062] New: Incorrect declaration of printf() in alias2.C oyvind dot harboe at zylin dot com
` (2 preceding siblings ...)
2005-04-25 18:23 ` pinskia at gcc dot gnu dot org
@ 2005-04-25 18:29 ` cvs-commit at gcc dot gnu dot org
2005-04-25 18:29 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-25 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-25 18:29 -------
Subject: Bug 21062
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2005-04-25 18:28:55
Modified files:
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/opt: alias2.C
Log message:
2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
PR testsuite/21062
* g++.dg/opt/alias2.C (printf): Correct the prototype.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5395&r2=1.5396
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/alias2.C.diff?cvsroot=gcc&r1=1.2&r2=1.3
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21062
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/21062] Incorrect declaration of printf() in alias2.C
2005-04-16 22:04 [Bug testsuite/21062] New: Incorrect declaration of printf() in alias2.C oyvind dot harboe at zylin dot com
` (3 preceding siblings ...)
2005-04-25 18:29 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-25 18:29 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-25 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-25 18:29 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21062
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-04-25 18:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-16 22:04 [Bug testsuite/21062] New: Incorrect declaration of printf() in alias2.C oyvind dot harboe at zylin dot com
2005-04-16 22:05 ` [Bug testsuite/21062] " oyvind dot harboe at zylin dot com
2005-04-17 9:43 ` oyvind dot harboe at zylin dot com
2005-04-25 18:23 ` pinskia at gcc dot gnu dot org
2005-04-25 18:29 ` cvs-commit at gcc dot gnu dot org
2005-04-25 18:29 ` 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).