public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor
@ 2013-09-18  7:37 bugzilla.gcc at buszta dot info
  2013-09-18  8:33 ` [Bug c++/58457] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: bugzilla.gcc at buszta dot info @ 2013-09-18  7:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

            Bug ID: 58457
           Summary: ICE when placement new operator is used with using
                    keyword and custom constructor
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bugzilla.gcc at buszta dot info

Created attachment 30847
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30847&action=edit
Preprocessed source

Minimal reproduction code:
struct allocator
{
    void operator delete(void*) {}
    void* operator new(unsigned int, void*) {}
};

struct type : public allocator
{
    type() {}
    using allocator::operator new;
    using allocator::operator delete;
};

int main()
{
    new (0) type;
    return 0;
}

Compiler output:
g++     main.cpp   -o main
main.cpp: In function 'int main()':
main.cpp:16:13: internal compiler error: in instantiate_type, at
cp/class.c:7512
     new (0) type;
             ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cc4KIZ6k.out file, please attach this to
your bugreport.
make: *** [main] Error 1

Compiler version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.8/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.8.1-10'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-i386
--with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-targets=all --enable-multiarch --with-arch-32=i586
--with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release
--build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.8.1 (Debian 4.8.1-10)

Non reproducible on older compilers.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
@ 2013-09-18  8:33 ` mpolacek at gcc dot gnu.org
  2013-09-18  9:14 ` paolo.carlini at oracle dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-18  8:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-09-18
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |4.8.2
            Summary|ICE when placement new      |[4.8/4.9 Regression] ICE
                   |operator is used with using |when placement new operator
                   |keyword and custom          |is used with using keyword
                   |constructor                 |and custom constructor
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
  2013-09-18  8:33 ` [Bug c++/58457] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2013-09-18  9:14 ` paolo.carlini at oracle dot com
  2013-09-18  9:53 ` mpolacek at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-18  9:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Note the testcase has to use __SIZE_TYPE__ instead of unsigned int.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
  2013-09-18  8:33 ` [Bug c++/58457] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
  2013-09-18  9:14 ` paolo.carlini at oracle dot com
@ 2013-09-18  9:53 ` mpolacek at gcc dot gnu.org
  2013-09-18 14:39 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-18  9:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r184873.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
                   ` (2 preceding siblings ...)
  2013-09-18  9:53 ` mpolacek at gcc dot gnu.org
@ 2013-09-18 14:39 ` paolo.carlini at oracle dot com
  2013-09-18 15:07 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-18 14:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Very likely the patch which will fix this will also fix PR57444.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
                   ` (3 preceding siblings ...)
  2013-09-18 14:39 ` paolo.carlini at oracle dot com
@ 2013-09-18 15:07 ` paolo.carlini at oracle dot com
  2013-09-18 18:02 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-18 15:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Seems easy.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
                   ` (4 preceding siblings ...)
  2013-09-18 15:07 ` paolo.carlini at oracle dot com
@ 2013-09-18 18:02 ` paolo.carlini at oracle dot com
  2013-09-18 18:11 ` paolo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-18 18:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |frankhb1989 at gmail dot com

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
*** Bug 57444 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
                   ` (5 preceding siblings ...)
  2013-09-18 18:02 ` paolo.carlini at oracle dot com
@ 2013-09-18 18:11 ` paolo at gcc dot gnu.org
  2013-09-18 18:13 ` paolo at gcc dot gnu.org
  2013-09-18 18:14 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-09-18 18:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

--- Comment #7 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Wed Sep 18 18:11:46 2013
New Revision: 202711

URL: http://gcc.gnu.org/viewcvs?rev=202711&root=gcc&view=rev
Log:
/cp
2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58457
    * class.c (instantiate_type): Loosen a bit the gcc_assert.

/testsuite
2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58457
    * g++.dg/parse/using4.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/parse/using4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
                   ` (6 preceding siblings ...)
  2013-09-18 18:11 ` paolo at gcc dot gnu.org
@ 2013-09-18 18:13 ` paolo at gcc dot gnu.org
  2013-09-18 18:14 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-09-18 18:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

--- Comment #8 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Wed Sep 18 18:13:15 2013
New Revision: 202712

URL: http://gcc.gnu.org/viewcvs?rev=202712&root=gcc&view=rev
Log:
/cp
2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58457
    * class.c (instantiate_type): Loosen a bit the gcc_assert.

/testsuite
2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58457
    * g++.dg/parse/using4.C: New.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/parse/using4.C
Modified:
    branches/gcc-4_8-branch/gcc/cp/ChangeLog
    branches/gcc-4_8-branch/gcc/cp/class.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/58457] [4.8/4.9 Regression] ICE when placement new operator is used with using keyword and custom constructor
  2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
                   ` (7 preceding siblings ...)
  2013-09-18 18:13 ` paolo at gcc dot gnu.org
@ 2013-09-18 18:14 ` paolo.carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-18 18:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58457

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
           Assignee|paolo.carlini at oracle dot com    |unassigned at gcc dot gnu.org

--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.8.2 and 4.9.0.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-09-18 18:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18  7:37 [Bug c++/58457] New: ICE when placement new operator is used with using keyword and custom constructor bugzilla.gcc at buszta dot info
2013-09-18  8:33 ` [Bug c++/58457] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
2013-09-18  9:14 ` paolo.carlini at oracle dot com
2013-09-18  9:53 ` mpolacek at gcc dot gnu.org
2013-09-18 14:39 ` paolo.carlini at oracle dot com
2013-09-18 15:07 ` paolo.carlini at oracle dot com
2013-09-18 18:02 ` paolo.carlini at oracle dot com
2013-09-18 18:11 ` paolo at gcc dot gnu.org
2013-09-18 18:13 ` paolo at gcc dot gnu.org
2013-09-18 18:14 ` paolo.carlini at oracle dot com

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).