* [Bug middle-end/17909] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
@ 2004-10-09 13:07 ` aj at gcc dot gnu dot org
2004-10-09 15:39 ` [Bug middle-end/17909] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: aj at gcc dot gnu dot org @ 2004-10-09 13:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aj at gcc dot gnu dot org 2004-10-09 13:07 -------
Created an attachment (id=7315)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7315&action=view)
Preprocessed source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
2004-10-09 13:07 ` [Bug middle-end/17909] " aj at gcc dot gnu dot org
@ 2004-10-09 15:39 ` pinskia at gcc dot gnu dot org
2004-10-09 16:20 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-09 15:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-09 15:39 -------
The code looks wrong (aka invalid):
__builtin_va_start(list,((const char *)(&(szFmt))));
Fixing the problem to be:
__builtin_va_start(list,szFmt);
Makes the code work which is correct I think.
Someone should correct me if I am wrong.
Reduced testcase:
struct QString {};
typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;
QString & sprintf(QString &s,const QString &szFmt,...)
{
va_list list;
__builtin_va_start(list,((const char *)(&(szFmt))));
__builtin_va_end(list);
return s;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE: verifiy_stms failed |[4.0 Regression] ICE:
| |verifiy_stms failed
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
2004-10-09 13:07 ` [Bug middle-end/17909] " aj at gcc dot gnu dot org
2004-10-09 15:39 ` [Bug middle-end/17909] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-10-09 16:20 ` pinskia at gcc dot gnu dot org
2004-10-09 17:40 ` schwab at suse dot de
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-09 16:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-09 16:20 -------
Just a quote from the C standard (as the C++ standard says to reference the C standard here):
"The parameter parmN is the identifier of the rightmost parameter in the variable parameter list in the
function definition" so these seems even more invalid/undefined.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-10-09 16:20 ` pinskia at gcc dot gnu dot org
@ 2004-10-09 17:40 ` schwab at suse dot de
2004-10-09 18:31 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: schwab at suse dot de @ 2004-10-09 17:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2004-10-09 17:40 -------
This is clearly invalid code, even without the address operator.
18.7.3 The restrictions that ISO C places on the second parameter to the
va_start() macro in header <stdarg.h> are different in this International
Standard. The parameter parmN is the identifier of the rightmost parameter in
the variable parameter list of the function definition (the one just before
the ...). If the parameter parmN is declared with a function, array, or
reference type, or with a type that is not compatible with the type that
results when passing an argument for which there is no parameter, the behavior
is undefined.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-10-09 17:40 ` schwab at suse dot de
@ 2004-10-09 18:31 ` pinskia at gcc dot gnu dot org
2004-10-10 3:41 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-09 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-09 18:31 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-10-09 18:31:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-10-09 18:31 ` pinskia at gcc dot gnu dot org
@ 2004-10-10 3:41 ` pinskia at gcc dot gnu dot org
2004-10-10 3:57 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-10 3:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-10 03:41 -------
I have a fix will be posting soon, even though this is undefined we accepted it before and created what
people expected.
--
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=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-10-10 3:41 ` pinskia at gcc dot gnu dot org
@ 2004-10-10 3:57 ` pinskia at gcc dot gnu dot org
2004-10-19 0:46 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-10 3:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-10 03:57 -------
Posted a patch/rfc for the problem: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00842.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-10-10 3:57 ` pinskia at gcc dot gnu dot org
@ 2004-10-19 0:46 ` pinskia at gcc dot gnu dot org
2004-11-24 18:49 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-19 0:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-19 00:46 -------
I am updating the patch per my suggestion and Jason asking for it.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|patch |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-10-19 0:46 ` pinskia at gcc dot gnu dot org
@ 2004-11-24 18:49 ` pinskia at gcc dot gnu dot org
2004-12-04 14:12 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-24 18:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-24 18:49 -------
New patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02048.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-11-24 18:49 ` pinskia at gcc dot gnu dot org
@ 2004-12-04 14:12 ` cvs-commit at gcc dot gnu dot org
2004-12-04 14:15 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-04 14:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-04 14:11 -------
Subject: Bug 17909
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-12-04 14:11:47
Modified files:
gcc : gimplify.c builtins.c tree.h
Log message:
2004-12-04 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17909
* builtins.c (fold_builtin_next_arg): Export and return true
when there is a warning or an error.
(expand_builtin_va_start): When fold_builtin_next_arg returns true,
return const0_rtx.
(expand_builtin): Likewise.
* gimplify.c (gimplify_call_expr): Error out if there is not
enough arguments to va_start. Call fold_builtin_next_arg also
on the second argument.
* tree.h (fold_builtin_next_arg): Prototype.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.89&r2=2.90
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.c.diff?cvsroot=gcc&r1=1.406&r2=1.407
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.662&r2=1.663
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-12-04 14:12 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-04 14:15 ` pinskia at gcc dot gnu dot org
2004-12-04 14:15 ` cvs-commit at gcc dot gnu dot org
2004-12-05 17:47 ` cvs-commit at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-04 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-04 14:15 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-12-04 14:15 ` pinskia at gcc dot gnu dot org
@ 2004-12-04 14:15 ` cvs-commit at gcc dot gnu dot org
2004-12-05 17:47 ` cvs-commit at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-04 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-04 14:15 -------
Subject: Bug 17909
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-12-04 14:15:02
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/other: vararg-2.C
Log message:
2004-12-04 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17909
* g++.dg/other/vararg-2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4714&r2=1.4715
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/vararg-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/17909] [4.0 Regression] ICE: verifiy_stms failed
2004-10-09 13:05 [Bug middle-end/17909] New: ICE: verifiy_stms failed aj at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-12-04 14:15 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-05 17:47 ` cvs-commit at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-05 17:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-05 17:47 -------
Subject: Bug 17909
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-12-05 17:47:18
Modified files:
gcc : ChangeLog
Log message:
Add forgotten to check in changeLog:
2004-12-04 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17909
* builtins.c (fold_builtin_next_arg): Export and return true
when there is a warning or an error.
(expand_builtin_va_start): When fold_builtin_next_arg returns true,
return const0_rtx.
(expand_builtin): Likewise.
* gimplify.c (gimplify_call_expr): Error out if there is not
enough arguments to va_start. Call fold_builtin_next_arg also
on the second argument.
* tree.h (fold_builtin_next_arg): Prototype.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6716&r2=2.6717
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17909
^ permalink raw reply [flat|nested] 14+ messages in thread