public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50881] New: ICE Segfault on compare this pointer with reference
@ 2011-10-27  7:30 djh at emss dot co.za
  2011-10-27  9:17 ` [Bug c++/50881] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: djh at emss dot co.za @ 2011-10-27  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50881
           Summary: ICE Segfault on compare this pointer with reference
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: djh@emss.co.za


Created attachment 25624
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25624
Program that causes ICE

When compiling the code attached (Note: it has a Qt dependency (sorry) ) the
compiler crashes with the following output:
$ make
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o test2.o test2.cpp
test2.cpp:19:5: warning: unused parameter ‘argc’ [-Wunused-parameter]
test2.cpp:19:5: warning: unused parameter ‘arcv’ [-Wunused-parameter]
test2.cpp: In constructor ‘CompareThisRefICE::CompareThisRefICE()’:
test2.cpp:9:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccjiYBA.out file, please attach this to
your bugreport.
make: *** [test2.o] Error 1

Was reproduced with Qt 4.5.2 and Qt 4.7.4 on gcc (Ubuntu/Linaro 4.6.1-9ubuntu3)
4.6.1

I recently upgraded to Ubuntu 11.10.

uname -a
Linux djh-emssnew 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC
2011 i686 i686 i386 GNU/Linux

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6.1/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686
--with-tune=generic --enable-checking=release --build=i686-linux-gnu
--host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

I have logged it with Ubuntu first
(https://bugs.launchpad.net/ubuntu/+source/gcc-4.6/+bug/877431) but no activity
for more than a week.


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

* [Bug c++/50881] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
@ 2011-10-27  9:17 ` rguenth at gcc dot gnu.org
  2011-10-27  9:33 ` djh at emss dot co.za
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-27  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011-10-27
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-27 09:17:21 UTC ---
Please proide preprocessed source of the file that produces this ICE.


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

* [Bug c++/50881] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
  2011-10-27  9:17 ` [Bug c++/50881] " rguenth at gcc dot gnu.org
@ 2011-10-27  9:33 ` djh at emss dot co.za
  2011-10-27 10:08 ` redi at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: djh at emss dot co.za @ 2011-10-27  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Diederik <djh at emss dot co.za> 2011-10-27 09:26:41 UTC ---
In the archive, see the file ccjiYBAm.out
If this is not sufficient, I can upload a new one.


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

* [Bug c++/50881] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
  2011-10-27  9:17 ` [Bug c++/50881] " rguenth at gcc dot gnu.org
  2011-10-27  9:33 ` djh at emss dot co.za
@ 2011-10-27 10:08 ` redi at gcc dot gnu.org
  2011-10-27 10:19 ` djh at emss dot co.za
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-10-27 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-27 10:00:39 UTC ---
That file is sufficient, but please attach it separately (the instructions at
http://gcc.gnu.org/bugs/ are pretty clear about wanting preprocessed source not
an archive that we need to extract to find the right file).

N.B. preprocessed C++ source should use the extension .ii so GCC knows what to
do with it, see http://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html - if you
use -save-temps as suggested at http://gcc.gnu.org/bugs/ then that file is
created automatically


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

* [Bug c++/50881] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
                   ` (2 preceding siblings ...)
  2011-10-27 10:08 ` redi at gcc dot gnu.org
@ 2011-10-27 10:19 ` djh at emss dot co.za
  2011-10-30 10:12 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: djh at emss dot co.za @ 2011-10-27 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Diederik <djh at emss dot co.za> 2011-10-27 10:18:18 UTC ---
Created attachment 25626
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25626
Preprocessed source file

Preprocessed file attached as requested.


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

* [Bug c++/50881] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
                   ` (3 preceding siblings ...)
  2011-10-27 10:19 ` djh at emss dot co.za
@ 2011-10-30 10:12 ` paolo.carlini at oracle dot com
  2011-10-30 10:15 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-30 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-30 10:12:35 UTC ---
Richard I just checked the preprocessed (on x86_64 -m32) and apparently
mainline is Ok, 4_6-branch Seg Faults at tree-cfg.c:1083, I'm not sure it's a
C++ issue.


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

* [Bug c++/50881] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
                   ` (4 preceding siblings ...)
  2011-10-30 10:12 ` paolo.carlini at oracle dot com
@ 2011-10-30 10:15 ` paolo.carlini at oracle dot com
  2011-11-02  8:58 ` [Bug middle-end/50881] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-30 10:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-30 10:14:40 UTC ---
Oops.


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

* [Bug middle-end/50881] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
                   ` (5 preceding siblings ...)
  2011-10-30 10:15 ` paolo.carlini at oracle dot com
@ 2011-11-02  8:58 ` rguenth at gcc dot gnu.org
  2011-11-02  9:02 ` [Bug middle-end/50881] [4.6 Regression] " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-02  8:58 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |middle-end

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-02 08:57:50 UTC ---
We have corrupt EH info during cfgcleaup right before expand.  Reducing.


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

* [Bug middle-end/50881] [4.6 Regression] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
                   ` (6 preceding siblings ...)
  2011-11-02  8:58 ` [Bug middle-end/50881] " rguenth at gcc dot gnu.org
@ 2011-11-02  9:02 ` rguenth at gcc dot gnu.org
  2012-03-01 15:44 ` jakub at gcc dot gnu.org
  2013-04-12 16:18 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-02  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.5.3
   Target Milestone|---                         |4.6.3
            Summary|ICE Segfault on compare     |[4.6 Regression] ICE
                   |this pointer with reference |Segfault on compare this
                   |                            |pointer with reference
      Known to fail|                            |4.6.1

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-02 09:02:16 UTC ---
Reduced testcase:

class CompareThisRefICE {
    CompareThisRefICE();
};
typedef unsigned short ushort;
class __attribute__((visibility("default"))) QString {
public:
    ~QString();
    inline QString(const char *ch) : d(fromAscii_helper(ch))     { }
    struct Data { ushort righttoleft : 11; };
    Data *d;
    static Data *fromAscii_helper(const char *str, int size = -1);
};
class B { };
CompareThisRefICE::CompareThisRefICE() {
    CompareThisRefICE t;
    if (!(this != &t))     {
        QString b("boom");
        throw B();
    }
}


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

* [Bug middle-end/50881] [4.6 Regression] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
                   ` (7 preceding siblings ...)
  2011-11-02  9:02 ` [Bug middle-end/50881] [4.6 Regression] " rguenth at gcc dot gnu.org
@ 2012-03-01 15:44 ` jakub at gcc dot gnu.org
  2013-04-12 16:18 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-01 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.3                       |4.6.4

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-01 14:39:26 UTC ---
GCC 4.6.3 is being released.


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

* [Bug middle-end/50881] [4.6 Regression] ICE Segfault on compare this pointer with reference
  2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
                   ` (8 preceding siblings ...)
  2012-03-01 15:44 ` jakub at gcc dot gnu.org
@ 2013-04-12 16:18 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:18 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.0

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:18:04 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.0.


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

end of thread, other threads:[~2013-04-12 16:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-27  7:30 [Bug c++/50881] New: ICE Segfault on compare this pointer with reference djh at emss dot co.za
2011-10-27  9:17 ` [Bug c++/50881] " rguenth at gcc dot gnu.org
2011-10-27  9:33 ` djh at emss dot co.za
2011-10-27 10:08 ` redi at gcc dot gnu.org
2011-10-27 10:19 ` djh at emss dot co.za
2011-10-30 10:12 ` paolo.carlini at oracle dot com
2011-10-30 10:15 ` paolo.carlini at oracle dot com
2011-11-02  8:58 ` [Bug middle-end/50881] " rguenth at gcc dot gnu.org
2011-11-02  9:02 ` [Bug middle-end/50881] [4.6 Regression] " rguenth at gcc dot gnu.org
2012-03-01 15:44 ` jakub at gcc dot gnu.org
2013-04-12 16:18 ` jakub at gcc dot gnu.org

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