public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53761] New: ICE (only with C++) on incorrect transparent union (first field has floating point type)
@ 2012-06-24 14:30 br+gcc at waldteufel dot eu
  2012-06-25  8:14 ` [Bug c++/53761] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: br+gcc at waldteufel dot eu @ 2012-06-24 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53761
           Summary: ICE (only with C++) on incorrect transparent union
                    (first field has floating point type)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: br+gcc@waldteufel.eu


While compiling

typedef union {
   double x;
} __attribute__(( __transparent_union__ )) example_t;

void fail(example_t x) { }

int main() {
   example_t x;
   fail(x);
}

as C code results in a warning message (see below for detailed system
information)

> gcc fail.c
fail.c:1:9: warning: union cannot be made transparent [enabled by default]

compiling the same code as C++ results in an ICE

> g++ -v fail.cc
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7.1/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id
--with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold
--enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--with-linker-hash-style=gnu --disable-multilib --disable-libssp
--disable-build-with-cxx --disable-build-poststage1-with-cxx
--enable-checking=release
Thread model: posix
gcc version 4.7.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/cc1plus -quiet -v -D_GNU_SOURCE
fail.cc -quiet -dumpbase fail.cc -mtune=generic -march=x86-64 -auxbase fail
-version -o /tmp/cc6IkFB2.s
GNU C++ (GCC) version 4.7.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.1.0-p10,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126590
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/x86_64-unknown-linux-gnu

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/backward
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/include
 /usr/local/include
 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/include-fixed
 /usr/include
End of search list.
GNU C++ (GCC) version 4.7.1 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.1.0-p10,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126590
Compiler executable checksum: ed88b587bcb9a173af71789c9d103676
fail.cc: In function 'int main()':
fail.cc:9:11: internal compiler error: in convert_move, at expr.c:325
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.


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

* [Bug c++/53761] ICE (only with C++) on incorrect transparent union (first field has floating point type)
  2012-06-24 14:30 [Bug c++/53761] New: ICE (only with C++) on incorrect transparent union (first field has floating point type) br+gcc at waldteufel dot eu
@ 2012-06-25  8:14 ` rguenth at gcc dot gnu.org
  2012-10-10  0:09 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-25  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid,
                   |                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-06-25
     Ever Confirmed|0                           |1
      Known to fail|                            |3.4.6, 4.7.1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-25 08:13:19 UTC ---
Confirmed.


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

* [Bug c++/53761] ICE (only with C++) on incorrect transparent union (first field has floating point type)
  2012-06-24 14:30 [Bug c++/53761] New: ICE (only with C++) on incorrect transparent union (first field has floating point type) br+gcc at waldteufel dot eu
  2012-06-25  8:14 ` [Bug c++/53761] " rguenth at gcc dot gnu.org
@ 2012-10-10  0:09 ` paolo.carlini at oracle dot com
  2012-10-25 16:15 ` [Bug c++/53761] ICE " paolo at gcc dot gnu.org
  2012-10-25 16:17 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-10  0:09 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-10 00:09:23 UTC ---
On it.


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

* [Bug c++/53761] ICE on incorrect transparent union (first field has floating point type)
  2012-06-24 14:30 [Bug c++/53761] New: ICE (only with C++) on incorrect transparent union (first field has floating point type) br+gcc at waldteufel dot eu
  2012-06-25  8:14 ` [Bug c++/53761] " rguenth at gcc dot gnu.org
  2012-10-10  0:09 ` paolo.carlini at oracle dot com
@ 2012-10-25 16:15 ` paolo at gcc dot gnu.org
  2012-10-25 16:17 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-10-25 16:15 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-10-25 16:15:19 UTC ---
Author: paolo
Date: Thu Oct 25 16:14:59 2012
New Revision: 192814

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192814
Log:
/cp
2012-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/53761
    * class.c (finish_struct_1): Reject aggregates decorated with
    __transparent_union__ which cannot be made transparent because
    the type of the first field has a different ABI from the class
    overall.

/testsuite
2012-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/53761
    * g++.dg/ext/transparent-union.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/ext/transparent-union.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/53761] ICE on incorrect transparent union (first field has floating point type)
  2012-06-24 14:30 [Bug c++/53761] New: ICE (only with C++) on incorrect transparent union (first field has floating point type) br+gcc at waldteufel dot eu
                   ` (2 preceding siblings ...)
  2012-10-25 16:15 ` [Bug c++/53761] ICE " paolo at gcc dot gnu.org
@ 2012-10-25 16:17 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-25 16:17 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-25 16:17:07 UTC ---
Fixed for 4.8.0.


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

end of thread, other threads:[~2012-10-25 16:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-24 14:30 [Bug c++/53761] New: ICE (only with C++) on incorrect transparent union (first field has floating point type) br+gcc at waldteufel dot eu
2012-06-25  8:14 ` [Bug c++/53761] " rguenth at gcc dot gnu.org
2012-10-10  0:09 ` paolo.carlini at oracle dot com
2012-10-25 16:15 ` [Bug c++/53761] ICE " paolo at gcc dot gnu.org
2012-10-25 16:17 ` 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).