[Bug c++/53602] [4.7/4.8 Regression] Libre Office causes an internal compiler error

2012-06-11 Thread andy at benton dot eu.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53602

--- Comment #14 from Andrew Benton andy at benton dot eu.com 2012-06-11 
15:00:41 UTC ---
Many thanks, Libre Office now compiles as expected. Should this bug be marked
as fixed?


[Bug c++/53602] New: Libre Office causes an internal compiler error

2012-06-07 Thread andy at benton dot eu.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53602

 Bug #: 53602
   Summary: Libre Office causes an internal compiler error
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: a...@benton.eu.com


Libre Office 3.5.3 compiles fine for me with Gcc 4.7 on x86_64 but on
i686 the build dies with this error:

Making:all_uno-skeletonmaker.dpobj
Compiling: unodevtools/source/skeletonmaker/skeletonmaker.cxx
Compiling: unodevtools/source/skeletonmaker/skeletoncommon.cxx
/home/andy/save/sources/extras/libreoffice-core-3.5.3.2/unodevtools/source/skeletonmaker/skeletoncommon.cxx:
In function 'void
skeletonmaker::checkDefaultInterfaces(boost::unordered::unordered_setrtl::OString,
rtl::OStringHash, const boost::unordered::unordered_setrtl::OString,
rtl::OStringHash, const rtl::OString)':
/home/andy/save/sources/extras/libreoffice-core-3.5.3.2/unodevtools/source/skeletonmaker/skeletoncommon.cxx:317:1:
internal compiler error: in force_move_args_size_note, at
combine-stack-adj.c:419
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

The internal compiler error and the request for a bug report to be
sent to gcc makes it look like a bug in Gcc 4.7. The actual code that
causes the problem looks like this:

void checkDefaultInterfaces(
 boost::unordered_set OString, OStringHash  interfaces,
 const boost::unordered_set OString, OStringHash  services,
   const OString  propertyhelper)
{
if ( services.empty() ) {
if (interfaces.find(com.sun.star.lang.XServiceInfo) !=
interfaces.end())
interfaces.erase(com.sun.star.lang.XServiceInfo);
} else {
if (interfaces.find(com.sun.star.lang.XServiceInfo) ==
interfaces.end())
interfaces.insert(com.sun.star.lang.XServiceInfo);
}

if ( propertyhelper.equals(_) ) {
if (interfaces.find(com.sun.star.beans.XPropertySet)
!= interfaces.end())
interfaces.erase(com.sun.star.beans.XPropertySet);
if (interfaces.find(com.sun.star.beans.XFastPropertySet)
!= interfaces.end())
interfaces.erase(com.sun.star.beans.XFastPropertySet);
if (interfaces.find(com.sun.star.beans.XPropertyAccess)
!= interfaces.end())
interfaces.erase(com.sun.star.beans.XPropertyAccess);
}
}

Googling on the error found this bug report at Ubunut:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1007616
But sadly they have no solution.

I have previously built Libre Office 3.5.3 on i686 with Gcc 4.7, what was
different this time was that I used an svn pull of the Gcc 4.7 branch
(r188021). Ie, Gcc had changes that had been checked into the Gcc 4.7 branch
since gcc-4.7.0 was released.

Looking at http://gcc.gnu.org/bugs/#detailed it seems that I'm supposed to
provide the output of something like:

gcc -v -save-temps all-your-options source-file

Sadly I have no clue how gcc was called by the Libre Office dmake system (I am
completely unfamiliar with dmake). If someone could guide me on how to find out
how gcc was called I would appreciate it.

Another problem with debugging this is that I can only reproduce this on a 32
bit system and all my 32 bit computers are old and slow. Compiling Libre office
takes about 20 hours but fortunately the error occurs only about 4 hours into
the build


[Bug c++/53602] Libre Office causes an internal compiler error

2012-06-07 Thread andy at benton dot eu.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53602

--- Comment #2 from Andrew Benton andy at benton dot eu.com 2012-06-07 
15:26:13 UTC ---
Genius idea! Unfortunately the preprocessor output skeletoncommon.ii is more
than 2MB and so I can't attach it to this bug. I've put it here
http://benton.eu.com/skeletoncommon.ii
The command that produced it was:

andy@router:~$ cd
/home/andy/libreoffice-core-3.5.4.2/unodevtools/source/skeletonmaker
andy@router:~/libreoffice-core-3.5.4.2/unodevtools/source/skeletonmaker$ g++ -v
-save-temps -fmessage-length=0 -c -Os -I.
-I../../unxlngi6.pro/inc/uno-skeletonmaker -I../inc -I../../inc -I../../unx/inc
-I../../unxlngi6.pro/inc -I.
-I/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/stl
-I/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/external
-I/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc
-I/home/andy/libreoffice-core-3.5.4.2/solenv/inc/unxlngi6
-I/home/andy/libreoffice-core-3.5.4.2/solenv/inc
-I/home/andy/libreoffice-core-3.5.4.2/res
-I/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/udkapi
-I/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/offapi
-I/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/oovbaapi -I.
-I../../res -I. -pipe -mtune=pentiumpro -fvisibility-inlines-hidden -std=c++0x
-Wno-deprecated-declarations -Wall -Wextra -Wendif-labels -Wshadow
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -DLINUX -DUNX -DVCL -DGCC -DINTEL
-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1
-DHAVE_GCC_VISIBILITY_FEATURE -DX86 -D__DMAKE -DUNIX -DCPPU_ENV=gcc3
-DGXX_INCLUDE_PATH=/usr/include/c++/4.7.1 -DSUPD=350 -DPRODUCT -DNDEBUG
-DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DGSTREAMER -DHAVE_THREADSAFE_STATICS
-fexceptions -fno-enforce-eh-specs -DEXCEPTIONS_ON -o
../../unxlngi6.pro/obj/skeletoncommon.o
/home/andy/libreoffice-core-3.5.4.2/unodevtools/source/skeletonmaker/skeletoncommon.cxx
g++: warning: -pipe ignored because -save-temps specified
Using built-in specs.
COLLECT_GCC=g++
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.7-30-05-12/configure --prefix=/usr --enable-shared
--enable-languages=c,c++ --enable-threads=posix --enable-__cxa_atexit
--enable-cloog-backend=isl --enable-clocale=gnu --disable-multilib
--disable-bootstrap --disable-static --with-system-zlib
Thread model: posix
gcc version 4.7.1 20120530 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fmessage-length=0' '-c' '-Os' '-I' '.'
'-I' '../../unxlngi6.pro/inc/uno-skeletonmaker' '-I' '../inc' '-I' '../../inc'
'-I' '../../unx/inc' '-I' '../../unxlngi6.pro/inc' '-I' '.' '-I'
'/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/stl' '-I'
'/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/external' '-I'
'/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc' '-I'
'/home/andy/libreoffice-core-3.5.4.2/solenv/inc/unxlngi6' '-I'
'/home/andy/libreoffice-core-3.5.4.2/solenv/inc' '-I'
'/home/andy/libreoffice-core-3.5.4.2/res' '-I'
'/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/udkapi' '-I'
'/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/offapi' '-I'
'/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/oovbaapi' '-I' '.'
'-I' '../../res' '-I' '.' '-pipe' '-mtune=pentiumpro'
'-fvisibility-inlines-hidden' '-std=c++11' '-Wno-deprecated-declarations'
'-Wall' '-Wextra' '-Wendif-labels' '-Wshadow' '-Wno-ctor-dtor-privacy'
'-Wno-non-virtual-dtor' '-D' 'LINUX' '-D' 'UNX' '-D' 'VCL' '-D' 'GCC' '-D'
'INTEL' '-D' 'GLIBC=2' '-D' '_PTHREADS' '-D' '_REENTRANT' '-D' 'NEW_SOLAR' '-D'
'_USE_NAMESPACE=1' '-D' 'HAVE_GCC_VISIBILITY_FEATURE' '-D' 'X86' '-D' '__DMAKE'
'-D' 'UNIX' '-D' 'CPPU_ENV=gcc3' '-D' 'GXX_INCLUDE_PATH=/usr/include/c++/4.7.1'
'-D' 'SUPD=350' '-D' 'PRODUCT' '-D' 'NDEBUG' '-D' 'OSL_DEBUG_LEVEL=0' '-D'
'OPTIMIZE' '-D' 'GSTREAMER' '-D' 'HAVE_THREADSAFE_STATICS' '-fexceptions'
'-fno-enforce-eh-specs' '-D' 'EXCEPTIONS_ON' '-o'
'../../unxlngi6.pro/obj/skeletoncommon.o' '-shared-libgcc' '-march=pentiumpro'
 /usr/libexec/gcc/i686-pc-linux-gnu/4.7.1/cc1plus -E -quiet -v -I . -I
../../unxlngi6.pro/inc/uno-skeletonmaker -I ../inc -I ../../inc -I
../../unx/inc -I ../../unxlngi6.pro/inc -I . -I
/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/stl -I
/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/external -I
/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc -I
/home/andy/libreoffice-core-3.5.4.2/solenv/inc/unxlngi6 -I
/home/andy/libreoffice-core-3.5.4.2/solenv/inc -I
/home/andy/libreoffice-core-3.5.4.2/res -I
/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/udkapi -I
/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/offapi -I
/home/andy/libreoffice-core-3.5.4.2/solver/unxlngi6.pro/inc/oovbaapi -I . -I
../../res -I . -D_GNU_SOURCE -D LINUX -D UNX -D VCL -D GCC -D INTEL -D GLIBC=2
-D _PTHREADS -D _REENTRANT -D NEW_SOLAR -D _USE_NAMESPACE=1 -D
HAVE_GCC_VISIBILITY_FEATURE -D X86 -D __DMAKE -D UNIX -D CPPU_ENV=gcc3 -D
GXX_INCLUDE_PATH=/usr

[Bug c++/53602] Libre Office causes an internal compiler error

2012-06-07 Thread andy at benton dot eu.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53602

--- Comment #4 from Andrew Benton andy at benton dot eu.com 2012-06-07 
16:12:00 UTC ---
Created attachment 27580
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27580
skeletoncommon.ii preprocessor output compressed

(In reply to comment #3)
 Remember that you can always compress it.

Doh!