public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54808] New: error: non-trivial conversion at assignment (with bit fields)
@ 2012-10-04  7:28 chgena at mail dot ru
  2012-10-04 12:09 ` [Bug middle-end/54808] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chgena at mail dot ru @ 2012-10-04  7:28 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54808
           Summary: error: non-trivial conversion at assignment (with bit
                    fields)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: chgena@mail.ru


Created attachment 28352
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28352
a.cpp, a.ii, a.s

g++ -c -v a.cpp
Using built-in specs.
COLLECT_GCC=g++
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.7
--enable-ssp --disable-libssp --disable-libitm --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --enable-linker-build-id
--program-suffix=-4.7 --enable-linux-futex --without-system-libunwind
--with-arch-32=i586 --with-tune=generic --build=i586-suse-linux
Thread model: posix
gcc version 4.7.1 20120723 [gcc-4_7-branch revision 189773] (SUSE Linux) 
COLLECT_GCC_OPTIONS='-c' '-v' '-shared-libgcc' '-mtune=generic' '-march=i586'
 /usr/lib/gcc/i586-suse-linux/4.7/cc1plus -quiet -v -D_GNU_SOURCE a.cpp -quiet
-dumpbase a.cpp -mtune=generic -march=i586 -auxbase a -version -o
/tmp/ccWMxjpd.s
GNU C++ (SUSE Linux) version 4.7.1 20120723 [gcc-4_7-branch revision 189773]
(i586-suse-linux)
        compiled by GNU C version 4.7.1 20120723 [gcc-4_7-branch revision
189773], GMP version 5.0.5, MPFR version 3.1.0-p1, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126872
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.7
 /usr/include/c++/4.7/i586-suse-linux
 /usr/include/c++/4.7/backward
 /usr/lib/gcc/i586-suse-linux/4.7/include
 /usr/local/include
 /usr/lib/gcc/i586-suse-linux/4.7/include-fixed
 /usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/include
 /usr/include
End of search list.
GNU C++ (SUSE Linux) version 4.7.1 20120723 [gcc-4_7-branch revision 189773]
(i586-suse-linux)
        compiled by GNU C version 4.7.1 20120723 [gcc-4_7-branch revision
189773], GMP version 5.0.5, MPFR version 3.1.0-p1, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126872
Compiler executable checksum: 101098d25a1106630df7d70889b6eb44
a.cpp: In function ‘void f()’:
a.cpp:5:6: error: non-trivial conversion at assignment
<unnamed-signed:4>
int
a.D.1839 = 0;

a.cpp:5: confused by earlier errors, bailing out


Source code:

struct A{
int a:3;
int :4;
};
void f()
{
A a={1};
}


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

* [Bug middle-end/54808] error: non-trivial conversion at assignment (with bit fields)
  2012-10-04  7:28 [Bug c++/54808] New: error: non-trivial conversion at assignment (with bit fields) chgena at mail dot ru
@ 2012-10-04 12:09 ` rguenth at gcc dot gnu.org
  2012-10-05 10:46 ` [Bug c++/54808] " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-04 12:09 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2012-10-04
          Component|c++                         |middle-end
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-04 12:08:43 UTC ---
Confirmed, fails since type checking is there, the zero init of the
anonymous element triggers this.  I will have a look.


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

* [Bug c++/54808] error: non-trivial conversion at assignment (with bit fields)
  2012-10-04  7:28 [Bug c++/54808] New: error: non-trivial conversion at assignment (with bit fields) chgena at mail dot ru
  2012-10-04 12:09 ` [Bug middle-end/54808] " rguenth at gcc dot gnu.org
@ 2012-10-05 10:46 ` rguenth at gcc dot gnu.org
  2012-10-09 14:10 ` chgena at mail dot ru
  2012-10-11 16:44 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-05 10:46 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
          Component|middle-end                  |c++
         AssignedTo|rguenth at gcc dot gnu.org  |unassigned at gcc dot
                   |                            |gnu.org

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-05 10:46:02 UTC ---
It's a C++ frontend issue, the zero is explicit in the CONSTRUCTOR inside
the INIT_EXPR.  The FE probably simply uses integer_zero_node.


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

* [Bug c++/54808] error: non-trivial conversion at assignment (with bit fields)
  2012-10-04  7:28 [Bug c++/54808] New: error: non-trivial conversion at assignment (with bit fields) chgena at mail dot ru
  2012-10-04 12:09 ` [Bug middle-end/54808] " rguenth at gcc dot gnu.org
  2012-10-05 10:46 ` [Bug c++/54808] " rguenth at gcc dot gnu.org
@ 2012-10-09 14:10 ` chgena at mail dot ru
  2012-10-11 16:44 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: chgena at mail dot ru @ 2012-10-09 14:10 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from chgena at mail dot ru 2012-10-09 14:10:09 UTC ---
Some 4.8 betas seem to be affected too


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

* [Bug c++/54808] error: non-trivial conversion at assignment (with bit fields)
  2012-10-04  7:28 [Bug c++/54808] New: error: non-trivial conversion at assignment (with bit fields) chgena at mail dot ru
                   ` (2 preceding siblings ...)
  2012-10-09 14:10 ` chgena at mail dot ru
@ 2012-10-11 16:44 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-11 16:44 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-11 16:43:48 UTC ---
I'm closing this as duplicate of PR51219.

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


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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-04  7:28 [Bug c++/54808] New: error: non-trivial conversion at assignment (with bit fields) chgena at mail dot ru
2012-10-04 12:09 ` [Bug middle-end/54808] " rguenth at gcc dot gnu.org
2012-10-05 10:46 ` [Bug c++/54808] " rguenth at gcc dot gnu.org
2012-10-09 14:10 ` chgena at mail dot ru
2012-10-11 16:44 ` 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).