public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11971] New: Problems with allocator::rebind::other
@ 2003-08-18 21:13 gcc-bugzilla at gcc dot gnu dot org
2003-08-18 21:47 ` [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call bangerth at dealii dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2003-08-18 21: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=11971
Summary: Problems with allocator::rebind::other
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: poschmid at lbl dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
The code a.C is rejected by gcc 3.4. This is a regression with respect to gcc
>3.3.
Environment:
System: Linux linux 2.4.20-4GB #1 Fri Jul 11 07:33:18 UTC 2003 i686 unknown unknown GNU/Linux
Architecture: i686
SuSE 8.2
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-debug
How-To-Repeat:
source code a.C
#include <stdarg.h>
class A {
public:
A();
A(const A& x);
A& operator= (const A& a);
~A();
};
void f(int count, A first...)
{
va_list ap;
va_start(ap, first);
A x = va_arg(ap, A);
}
int main()
{
A a, b, c;
f(3, a, b, c);
}
g++ -v -W -Wall -save-temps a.C
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-debug
Thread model: posix
gcc version 3.4 20030806 (experimental)
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus -E -quiet -v -D_GNU_SOURCE a.C -mtune=pentiumpro -W -Wall -o a.ii
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/i686-pc-linux-gnu
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/backward
/usr/local/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/include
/usr/include
End of search list.
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus -fpreprocessed a.ii -quiet -dumpbase a.C -mtune=pentiumpro -auxbase a -W -Wall -version -o a.s
GNU C++ version 3.4 20030806 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.4 20030806 (experimental).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31899
a.C: In function `void f(int, A, ...)':
a.C:14: warning: cannot pass objects of non-POD type `class A' through `...';
call will abort at runtime
a.C:15: warning: cannot receive objects of non-POD type `class A' through `...'
a.C:14: warning: second parameter of `va_start' not last named argument
a.C:15: internal compiler error: in cp_expr_size, at cp/cp-lang.c:330
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
# 1 "a.C"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "a.C"
# 1 "/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/include/stdarg.h" 1 3 4
# 43 "/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 105 "/usr/local/lib/gcc/i686-pc-linux-gnu/3.4/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 2 "a.C" 2
class A {
public:
A();
A(const A& x);
A& operator= (const A& a);
~A();
};
void f(int count, A first...)
{
va_list ap;
__builtin_va_start(ap,first);
A x = __builtin_va_arg(ap,A);
}
int main()
{
A a, b, c;
f(3, a, b, c);
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
@ 2003-08-18 21:47 ` bangerth at dealii dot org
2003-08-18 21:58 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: bangerth at dealii dot org @ 2003-08-18 21:47 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=11971
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Priority|P3 |P1
Last reconfirmed|0000-00-00 00:00:00 |2003-08-18 21:47:26
date| |
Summary|Problems with |[3.4 regression] ICE in
|allocator::rebind::other |cp_expr_size with variadic
| |function call
Target Milestone|--- |3.4
------- Additional Comments From bangerth at dealii dot org 2003-08-18 21:47 -------
The ICE is certainly a regression. I guess the warning is warranted, since you
really put objects of non-POD type through ...
W.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
2003-08-18 21:47 ` [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call bangerth at dealii dot org
@ 2003-08-18 21:58 ` pinskia at gcc dot gnu dot org
2003-08-29 20:08 ` janis187 at us dot ibm dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-18 21:58 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=11971
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-18 21:58 -------
>From Phil's regression hunter: Search converges between 2003-01-02-trunk (#182) and 2003-
01-03-trunk (#183).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
2003-08-18 21:47 ` [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call bangerth at dealii dot org
2003-08-18 21:58 ` pinskia at gcc dot gnu dot org
@ 2003-08-29 20:08 ` janis187 at us dot ibm dot com
2003-08-29 21:16 ` jason at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janis187 at us dot ibm dot com @ 2003-08-29 20:08 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=11971
janis187 at us dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
------- Additional Comments From janis187 at us dot ibm dot com 2003-08-29 20:08 -------
The regression in PR 11971 was introduced or exposed by this patch:
--- gcc/gcc/ChangeLog ---
2003-01-02 Jason Merrill <jason@redhat.com>
* fold-const.c (fold) [COND_EXPR]: Avoid NOP_EXPRs better.
* integrate.c (copy_decl_for_inlining): Don't clear the rtl for
static/external decls.
--- gcc/gcc/cp/ChangeLog ---
2003-01-02 Jason Merrill <jason@redhat.com>
* call.c (build_conditional_expr): Stabilize lvalues properly.
* cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
* tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
Don't allow CALL_EXPR or VA_ARG_EXPR, either.
* call.c (convert_like_real): Call decl_constant_value for an
IDENTITY_CONV even if there are no more conversions.
[also cvt.c, decl2.c, dump.c, except.c, init.c, tree.c]
The regression hunt took place on i686-pc-linux-gnu using the submitter's
test case. Before this patch the test case got these additional
warnings rather than the ICE:
11971.C: In function `int main()':
11971.C:22: warning: cannot pass objects of non-POD type `class A' through
`...'; call will abort at runtime
11971.C:22: warning: cannot pass objects of non-POD type `class A' through
`...'; call will abort at runtime
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2003-08-29 20:08 ` janis187 at us dot ibm dot com
@ 2003-08-29 21:16 ` jason at gcc dot gnu dot org
2003-10-30 2:26 ` jason at redhat dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2003-08-29 21: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=11971
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at redhat dot com
|dot org |
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2003-08-29 21:16 ` jason at gcc dot gnu dot org
@ 2003-10-30 2:26 ` jason at redhat dot com
2003-11-14 19:07 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at redhat dot com @ 2003-10-30 2:26 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=11971
jason at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
Priority|P1 |P2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2003-10-30 2:26 ` jason at redhat dot com
@ 2003-11-14 19:07 ` jason at gcc dot gnu dot org
2003-11-29 21:45 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2003-11-14 19:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jason at gcc dot gnu dot org 2003-11-14 19:07 -------
Here is a valid program which we currently reject because va_start isn't magic
enough. We currently treat it as a normal variadic function.
#include <stdarg.h>
class A {
public:
A() {}
A(const A& x) {}
A& operator= (const A& a) {}
~A() {}
};
void f(A first...)
{
va_list ap;
va_start(ap, first);
int x = va_arg(ap, int);
}
int main()
{
A a;
f(a, 3);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11971
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
` (5 preceding siblings ...)
2003-11-14 19:07 ` jason at gcc dot gnu dot org
@ 2003-11-29 21:45 ` pinskia at gcc dot gnu dot org
2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
2003-12-09 6:47 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-29 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-29 21:45 -------
*** Bug 11929 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jbeulich at novell dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11971
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
` (6 preceding siblings ...)
2003-11-29 21:45 ` pinskia at gcc dot gnu dot org
@ 2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
2003-12-09 6:47 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-12-09 4:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-09 04:08 -------
Subject: Bug 11971
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jason@gcc.gnu.org 2003-12-09 04:08:50
Modified files:
gcc/cp : ChangeLog call.c cp-tree.h ptree.c tree.c
Log message:
PR c++/11971
* tree.c (build_local_temp): Split out from build_cplus_new.
(force_target_expr): New fn.
* call.c (call_builtin_trap): Call it. Take a type parm.
(convert_arg_to_ellipsis): Pass it.
(build_x_va_arg): Use call_builtin_trap.
PR c++/11929
* call.c (magic_varargs_p): New fn.
(build_over_call): Do no ellipsis conversions for arguments to
functions with magic varargs.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3789&r2=1.3790
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.442&r2=1.443
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.936&r2=1.937
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ptree.c.diff?cvsroot=gcc&r1=1.37&r2=1.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&r1=1.355&r2=1.356
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11971
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
` (7 preceding siblings ...)
2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
@ 2003-12-09 6:47 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-09 6:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-09 06:47 -------
Fixed for 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11971
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-12-09 6:47 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 21:13 [Bug c++/11971] New: Problems with allocator::rebind::other gcc-bugzilla at gcc dot gnu dot org
2003-08-18 21:47 ` [Bug c++/11971] [3.4 regression] ICE in cp_expr_size with variadic function call bangerth at dealii dot org
2003-08-18 21:58 ` pinskia at gcc dot gnu dot org
2003-08-29 20:08 ` janis187 at us dot ibm dot com
2003-08-29 21:16 ` jason at gcc dot gnu dot org
2003-10-30 2:26 ` jason at redhat dot com
2003-11-14 19:07 ` jason at gcc dot gnu dot org
2003-11-29 21:45 ` pinskia at gcc dot gnu dot org
2003-12-09 4:08 ` cvs-commit at gcc dot gnu dot org
2003-12-09 6:47 ` 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).