Bug 29182 - ICE when using long double with virtual inheritance and virtual methods
Summary: ICE when using long double with virtual inheritance and virtual methods
Status: RESOLVED DUPLICATE of bug 26957
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 29209
  Show dependency treegraph
 
Reported: 2006-09-22 13:57 UTC by Michael Haubenwallner
Modified: 2006-09-25 09:02 UTC (History)
6 users (show)

See Also:
Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
Build: hppa2.0w-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed:


Attachments
valuetype_impl.ii.bz2 (1.5MB unpacked) (141.87 KB, application/octet-stream)
2006-09-22 13:59 UTC, Michael Haubenwallner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Haubenwallner 2006-09-22 13:57:13 UTC
While building mico-2.3.11 on hppa2.0w-hp-hpux11.11, got this error:

$ c++  -I../include  -O2  -Wall  -g -pthread -D_REENTRANT   -DPIC -fPIC  -c valuetype_impl.cc -o valuetype_impl.pic.o
../include/mico/valuetype_impl.h: In member function 'void CORBA::DataOutputStream_impl::_ZTv0_n68_N5CORBA21DataOutputStream_impl16write_longdoubleEe(CORBA::LongDouble)':
../include/mico/valuetype_impl.h:44: warning: 'value___2332' is used uninitialized in this function
valuetype_impl.cc:638: internal compiler error: in make_decl_rtl, at varasm.c:890
Please subm<snip>

It is independent of at least those compilerflags: -g/-O*/-pthread/-fPIC

Strange: If I remove all the #line directions from preprocessor output, the error is different:

$ c++ -c valuetype_impl.ii -o valuetype_impl.o                          
valuetype_impl.ii:32: error: redeclaration of C++ built-in type 'wchar_t'
valuetype_impl.ii: In static member function 'static wchar_t std::numeric_limits<wchar_t>::min()':
valuetype_impl.ii:6640: warning: left shift count >= width of type
valuetype_impl.ii: In static member function 'static wchar_t std::numeric_limits<wchar_t>::max()':
valuetype_impl.ii:6642: warning: left shift count >= width of type
valuetype_impl.ii:49485: confused by earlier errors, bailing out

Attached is the preprocessor output, from original command with '-save-temps'.
I have it bzip2'ed, as I'm unable to reduce it to a small testcase.

Have built gcc with one patch, found here:
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00171.html

$ g++ -v
Using built-in specs.
Target: hppa2.0w-hp-hpux11.11
Configured with: /mnt/toolsjunk/snapshot/src/sasrvb/toolsbox-3.5.1.6pre.20060921/buildroot/gcc/gcc-4.1.1/configure --enable-threads=posix --with-gnu-as --with-as=/tools/snapshot/toolsbox-3.5.1.6pre.20060921/hppa2.0w-hp-hpux11.11/hppa2.0w-hp-hpux11.11/bin/as --without-gnu-ld --with-local-prefix=/tools/snapshot/toolsbox-3.5.1.6pre.20060921/hppa2.0w-hp-hpux11.11 --disable-nls --enable-version-specific-runtime-libs --prefix=/tools/snapshot/toolsbox-3.5.1.6pre.20060921/hppa2.0w-hp-hpux11.11
Thread model: posix
gcc version 4.1.1

$ /tools/snapshot/toolsbox-3.5.1.6pre.20060921/hppa2.0w-hp-hpux11.11/hppa2.0w-hp-hpux11.11/bin/as --version
GNU assembler 2.16.1
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `hppa2.0w-hp-hpux11.11'.
Comment 1 Michael Haubenwallner 2006-09-22 13:59:11 UTC
Created attachment 12307 [details]
valuetype_impl.ii.bz2 (1.5MB unpacked)
Comment 2 Michael Haubenwallner 2006-09-22 14:46:38 UTC
was playing around somewhat after posting and indeed found the small testcase:

$ cat aa.cc

class A {
	virtual void f(long double);
};

class B : virtual public A
{
	void f(long double);
};

void B::f(long double x)
{
}

$ c++ -c aa.cc        
aa.cc: In member function 'void B::_ZTv0_n12_N1B1fEe(long double)':
aa.cc:7: internal compiler error: in make_decl_rtl, at varasm.c:890
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 3 Andrew Pinski 2006-09-22 15:44:30 UTC

*** This bug has been marked as a duplicate of 26957 ***