public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/11971] New: Problems with allocator::rebind::other
Date: Mon, 18 Aug 2003 21:13:00 -0000	[thread overview]
Message-ID: <20030818211350.11971.poschmid@lbl.gov> (raw)

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);
}


             reply	other threads:[~2003-08-18 21:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-18 21:13 gcc-bugzilla at gcc dot gnu dot org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030818211350.11971.poschmid@lbl.gov \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).