public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59318] New: ICE on invalid C++ code
@ 2013-11-27 18:37 hjl.tools at gmail dot com
  2014-01-24 10:51 ` [Bug c++/59318] " paolo.carlini at oracle dot com
  2014-07-31 13:34 ` paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-27 18:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59318
           Summary: ICE on invalid C++ code
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com

[hjl@gnu-6 pr59311]$ cat x.ii
#pragma GCC visibility push(default)

namespace std
{

  template<class _E>
    class initializer_list
    {
    public:
      typedef _E value_type;
    };

}

#pragma GCC visibility pop

struct A
{
  int i;
  A(std::initializer_list<int>) { }
};

int x = 4;
int main(int argc, char **argv)
{
  { int i[x] = { 42, 42, 42, 42 }; }
  {
    A a[x] = { argc };
    if (a[1].i != 42)
      __builtin_abort ();
  }
}
[hjl@gnu-6 pr59311]$ make x.s
/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/ -std=c++1y -m32 -S x.ii
x.ii: In function ‘int main(int, char**)’:
x.ii:28:21: error: conversion from ‘int’ to non-scalar type ‘A’ requested
     A a[x] = { argc };
                     ^
x.ii:28:21: internal compiler error: Segmentation fault
0xd1bbee crash_signal
    /export/gnu/import/git/gcc/gcc/toplev.c:336
0x57d296 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
    /export/gnu/import/git/gcc/gcc/tree.h:2821
0x593382 convert_like_real
    /export/gnu/import/git/gcc/gcc/cp/call.c:6059
0x596b0b build_over_call
    /export/gnu/import/git/gcc/gcc/cp/call.c:6947
0x592ae7 convert_like_real
    /export/gnu/import/git/gcc/gcc/cp/call.c:5964
0x59363e convert_like_real
    /export/gnu/import/git/gcc/gcc/cp/call.c:6089
0x59f55f perform_implicit_conversion_flags(tree_node*, tree_node*, int, int)
    /export/gnu/import/git/gcc/gcc/cp/call.c:9023
0x59f5f1 perform_implicit_conversion(tree_node*, tree_node*, int)
    /export/gnu/import/git/gcc/gcc/cp/call.c:9035
0x72d132 ocp_convert(tree_node*, tree_node*, int, int, int)
    /export/gnu/import/git/gcc/gcc/cp/cvt.c:861
0x73c92f expand_default_init
    /export/gnu/import/git/gcc/gcc/cp/init.c:1605
0x73d40c expand_aggr_init_1
    /export/gnu/import/git/gcc/gcc/cp/init.c:1774
0x73c2cc build_aggr_init(tree_node*, tree_node*, int, int)
    /export/gnu/import/git/gcc/gcc/cp/init.c:1525
0x7439a9 build_vec_init(tree_node*, tree_node*, tree_node*, bool, int, int)
    /export/gnu/import/git/gcc/gcc/cp/init.c:3737
0x73c10c build_aggr_init(tree_node*, tree_node*, int, int)
    /export/gnu/import/git/gcc/gcc/cp/init.c:1506
0x5bc2b5 build_aggr_init_full_exprs
    /export/gnu/import/git/gcc/gcc/cp/decl.c:5583
0x5bce86 check_initializer
    /export/gnu/import/git/gcc/gcc/cp/decl.c:5719
0x5c01a2 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
    /export/gnu/import/git/gcc/gcc/cp/decl.c:6388
0x6db07f cp_parser_init_declarator
    /export/gnu/import/git/gcc/gcc/cp/parser.c:16743
0x6d2198 cp_parser_simple_declaration
    /export/gnu/import/git/gcc/gcc/cp/parser.c:11134
0x6d1f88 cp_parser_block_declaration
    /export/gnu/import/git/gcc/gcc/cp/parser.c:11015
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [x.s] Error 1
[hjl@gnu-6 pr59311]$
>From gcc-bugs-return-436055-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Nov 27 18:39:36 2013
Return-Path: <gcc-bugs-return-436055-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5920 invoked by alias); 27 Nov 2013 18:39:36 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 5885 invoked by uid 48); 27 Nov 2013 18:39:33 -0000
From: "tromey at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/59319] New: gcc does not emit DW_AT_friend or DW_TAG_friend
Date: Wed, 27 Nov 2013 18:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: tromey at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-59319-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02832.txt.bz2
Content-length: 628

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY319

            Bug ID: 59319
           Summary: gcc does not emit DW_AT_friend or DW_TAG_friend
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tromey at gcc dot gnu.org

I couldn't find a way to make GCC emit DW_TAG_friend
or DW_AT_friend.  A quick grep through dwarf2out.c
seems to confirm this.
I think these are needed for gdb to properly implement ADL,
though I don't have an example ready.


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

* [Bug c++/59318] ICE on invalid C++ code
  2013-11-27 18:37 [Bug c++/59318] New: ICE on invalid C++ code hjl.tools at gmail dot com
@ 2014-01-24 10:51 ` paolo.carlini at oracle dot com
  2014-07-31 13:34 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-24 10:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-01-24
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com
     Ever confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Looking into it.


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

* [Bug c++/59318] ICE on invalid C++ code
  2013-11-27 18:37 [Bug c++/59318] New: ICE on invalid C++ code hjl.tools at gmail dot com
  2014-01-24 10:51 ` [Bug c++/59318] " paolo.carlini at oracle dot com
@ 2014-07-31 13:34 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-07-31 13:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59318

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

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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed by the same patch.

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


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

end of thread, other threads:[~2014-07-31 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27 18:37 [Bug c++/59318] New: ICE on invalid C++ code hjl.tools at gmail dot com
2014-01-24 10:51 ` [Bug c++/59318] " paolo.carlini at oracle dot com
2014-07-31 13:34 ` 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).