public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
@ 2011-12-08 22:34 ` reichelt at gcc dot gnu.org
  2011-12-13  9:01 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-08 22:34 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |4.7.0


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

* [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list
@ 2011-12-08 22:45 reichelt at gcc dot gnu.org
  2011-12-08 22:34 ` [Bug c++/51475] " reichelt at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-08 22:45 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51475
           Summary: [c++0x] [4.7 Regression] ICE with invalid
                    initializer_list
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


The following invalid code snippet triggers an ICE on trunk:

=======================================
#include <initializer_list>

struct A
{
  A(int*);
};

struct B
{
  const std::initializer_list<A>& x;
};

B b = {{1}};
=======================================

bug.cc:13:11: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
  2011-12-08 22:34 ` [Bug c++/51475] " reichelt at gcc dot gnu.org
@ 2011-12-13  9:01 ` jakub at gcc dot gnu.org
  2011-12-13 22:56 ` dodji at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-13  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-13
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-13 08:48:52 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178790


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
  2011-12-08 22:34 ` [Bug c++/51475] " reichelt at gcc dot gnu.org
  2011-12-13  9:01 ` jakub at gcc dot gnu.org
@ 2011-12-13 22:56 ` dodji at gcc dot gnu.org
  2011-12-14  1:45 ` paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-12-13 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

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

--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-13 22:54:30 UTC ---
I can't reproduce this with trunk r182308.  Here is what I get:

$ cat -n test-PR51475.cc 
     1    #include <initializer_list>
     2    
     3    struct A
     4    {
     5        A(int*);
     6    };
     7    
     8    struct B
     9    {
    10        const std::initializer_list<A>& x;
    11    };
    12    
    13    B b = {{1}};
$ ./cc1plus -quiet -std=c++11 -I ../../libstdc++-v3/libsupc++/ 
-I../x86_64-unknown-linux-gnu/libstdc++-v3/include/
-I../x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu/
test-PR51477.cc
test-PR51477.cc:13:11: erreur: invalid conversion from ‘<brace-enclosed
initializer list>’ to ‘const std::initializer_list<A>&’ [-fpermissive]
test-PR51477.cc:13:11: erreur: cannot convert ‘{1}’ from type ‘<brace-enclosed
initializer list>’ to type ‘const std::initializer_list<A>&’
$


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-13 22:56 ` dodji at gcc dot gnu.org
@ 2011-12-14  1:45 ` paolo.carlini at oracle dot com
  2011-12-14  7:43 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-14  1:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-14 01:16:28 UTC ---
I can still reproduce it with 182320. Note that quite a few of these ICEs filed
by Volker disappear or become "... bailing out" in release-mode. Not to say we
shouldn't fix them (when time allows ;) but IMHO we should concentrate on those
which do not disappear and of course in particular on those which happen
without any meaningful diagnostics output before (I don't know if we have a
concise way to describe this in Bugzilla, and prioritize, again IMHO we should)


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-12-14  1:45 ` paolo.carlini at oracle dot com
@ 2011-12-14  7:43 ` jakub at gcc dot gnu.org
  2011-12-14  9:20 ` dodji at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-14  7:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-14 07:22:59 UTC ---
This one segfaults right away for me, even with trunk as of today (though, I've
preprocessed it with 4.6.2 g++ -E -std=c++0x), so this is the more important
ice-on-invalid-code category rather than just error-recovery.


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-12-14  7:43 ` jakub at gcc dot gnu.org
@ 2011-12-14  9:20 ` dodji at gcc dot gnu.org
  2011-12-14  9:45 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-12-14  9:20 UTC (permalink / raw)
  To: gcc-bugs

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

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |dodji at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-14 09:07:00 UTC ---
OK, I'll look at it some more.


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-12-14  9:20 ` dodji at gcc dot gnu.org
@ 2011-12-14  9:45 ` paolo.carlini at oracle dot com
  2011-12-14 18:26 ` dodji at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-14  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-14 09:42:42 UTC ---
Right, error-recovery. The problem is, in release-mode the category can easily
change. I'm also not  100% sure that all the PRs are properly cat in terms of
that, but this is a practical issue.


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-12-14  9:45 ` paolo.carlini at oracle dot com
@ 2011-12-14 18:26 ` dodji at gcc dot gnu.org
  2011-12-14 21:53 ` dodji at gcc dot gnu.org
  2011-12-14 21:55 ` dodji at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-12-14 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-14 18:18:56 UTC ---
A candidate patch was sent to
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01120.html


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-12-14 18:26 ` dodji at gcc dot gnu.org
@ 2011-12-14 21:53 ` dodji at gcc dot gnu.org
  2011-12-14 21:55 ` dodji at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-12-14 21:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-14 21:49:57 UTC ---
Author: dodji
Date: Wed Dec 14 21:49:52 2011
New Revision: 182343

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182343
Log:
PR c++/51475 - ICE with invalid initializer-list

gcc/cp/

    PR c++/51475
    * call.c (struct conversion)<u.next>: Update comment.
    (next_conversion): New static function.
    (convert_like_real): Use it.

gcc/testsuite/

    PR c++/51475
    * g++.dg/cpp0x/initlist63.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/initlist63.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list
  2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-12-14 21:53 ` dodji at gcc dot gnu.org
@ 2011-12-14 21:55 ` dodji at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-12-14 21:55 UTC (permalink / raw)
  To: gcc-bugs

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

Dodji Seketeli <dodji at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #9 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-14 21:52:22 UTC ---
This should be fixed in trunk (4.7).


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

end of thread, other threads:[~2011-12-14 21:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-08 22:45 [Bug c++/51475] New: [c++0x] [4.7 Regression] ICE with invalid initializer_list reichelt at gcc dot gnu.org
2011-12-08 22:34 ` [Bug c++/51475] " reichelt at gcc dot gnu.org
2011-12-13  9:01 ` jakub at gcc dot gnu.org
2011-12-13 22:56 ` dodji at gcc dot gnu.org
2011-12-14  1:45 ` paolo.carlini at oracle dot com
2011-12-14  7:43 ` jakub at gcc dot gnu.org
2011-12-14  9:20 ` dodji at gcc dot gnu.org
2011-12-14  9:45 ` paolo.carlini at oracle dot com
2011-12-14 18:26 ` dodji at gcc dot gnu.org
2011-12-14 21:53 ` dodji at gcc dot gnu.org
2011-12-14 21:55 ` dodji 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).