[Bug 1267954] [NEW] Internal compiler error when trying to instantiate an incomplete class using make_shared

Joris Vergeer jorisvergeer1992 at gmail.com
Fri Jan 10 18:10:34 UTC 2014


Public bug reported:

lsb_release -rd:
Description:	Linux Mint 15 Olivia
Release:	15

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --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 --enable-objc-gc --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)

command:
/usr/bin/c++ -std=c++11 ../src/main.cpp

Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccp2YqiK.out file, please attach this to your bugreport.

source:
#include <memory>

class Foo {
public:
 virtual void bar() = 0;
};

int main() {
 std::make_shared<Foo>();
}

expected result:
Some errors and warnings about the class not being complete.

** Affects: gcc-4.7 (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "Preprocessed source file"
   https://bugs.launchpad.net/bugs/1267954/+attachment/3945506/+files/ccITgKAj.out

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.7 in Ubuntu.
https://bugs.launchpad.net/bugs/1267954

Title:
  Internal compiler error when trying to instantiate an incomplete class
  using make_shared

Status in “gcc-4.7” package in Ubuntu:
  New

Bug description:
  lsb_release -rd:
  Description:	Linux Mint 15 Olivia
  Release:	15

  gcc -v
  Using built-in specs.
  COLLECT_GCC=gcc
  COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
  Target: x86_64-linux-gnu
  Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --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 --enable-objc-gc --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
  Thread model: posix
  gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)

  command:
  /usr/bin/c++ -std=c++11 ../src/main.cpp

  Internal compiler error: Error reporting routines re-entered.
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
  Preprocessed source stored into /tmp/ccp2YqiK.out file, please attach this to your bugreport.

  source:
  #include <memory>

  class Foo {
  public:
   virtual void bar() = 0;
  };

  int main() {
   std::make_shared<Foo>();
  }

  expected result:
  Some errors and warnings about the class not being complete.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1267954/+subscriptions



More information about the foundations-bugs mailing list