public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault
@ 2014-11-22 22:48 narayan_behera at hotmail dot com
  2014-11-23  1:21 ` [Bug c++/64029] [4.9/5 Regression] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: narayan_behera at hotmail dot com @ 2014-11-22 22:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64029
           Summary: const int (&in)[]{1,2,3,4,5}; results in internal
                    compiler error: Segmentation fault
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: narayan_behera at hotmail dot com

Here is a single line program that recreates the bug:

int main() {  const int (&in)[]{1,2,3,4,5};  return 0; }

-------------- g++ diagnostics follows ----------------------------

g++ -std=c++11 -Wall -Wextra -c usearr1.cpp
usearr1.cpp: In function ‘int main()’:
usearr1.cpp:4:15: warning: unused variable ‘in’ [-Wunused-variable]
   const int (&in)[]{1,2,3,4,5};
               ^
usearr1.cpp:4:30: internal compiler error: Segmentation fault
   const int (&in)[]{1,2,3,4,5};
                              ^
0x855784a crash_signal
    .././gcc-4.9.1/gcc/toplev.c:337
0x83e6aca gimplify_decl_expr
    .././gcc-4.9.1/gcc/gimplify.c:1359
0x83e6aca gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
    .././gcc-4.9.1/gcc/gimplify.c:7820
0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**)
    .././gcc-4.9.1/gcc/gimplify.c:5373
0x83e7904 gimplify_cleanup_point_expr
    .././gcc-4.9.1/gcc/gimplify.c:5149
0x83e7904 gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
    .././gcc-4.9.1/gcc/gimplify.c:7990
0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**)
    .././gcc-4.9.1/gcc/gimplify.c:5373
0x83e81fc gimplify_statement_list
    .././gcc-4.9.1/gcc/gimplify.c:1432
0x83e81fc gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
    .././gcc-4.9.1/gcc/gimplify.c:8042
0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**)
    .././gcc-4.9.1/gcc/gimplify.c:5373
0x83ea4a8 gimplify_bind_expr
    .././gcc-4.9.1/gcc/gimplify.c:1099
0x83e784e gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
    .././gcc-4.9.1/gcc/gimplify.c:7824
0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**)
    .././gcc-4.9.1/gcc/gimplify.c:5373
0x83e81fc gimplify_statement_list
    .././gcc-4.9.1/gcc/gimplify.c:1432
0x83e81fc gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
    .././gcc-4.9.1/gcc/gimplify.c:8042
0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**)
    .././gcc-4.9.1/gcc/gimplify.c:5373
0x83eaaba gimplify_body(tree_node*, bool)
    .././gcc-4.9.1/gcc/gimplify.c:8734
0x83eada0 gimplify_function_tree(tree_node*)
    .././gcc-4.9.1/gcc/gimplify.c:8887
0x82e3cf8 analyze_function
    .././gcc-4.9.1/gcc/cgraphunit.c:649
0x82e4c86 analyze_functions
    .././gcc-4.9.1/gcc/cgraphunit.c:1017
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.
>From gcc-bugs-return-468104-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 22 23:42:46 2014
Return-Path: <gcc-bugs-return-468104-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30529 invoked by alias); 22 Nov 2014 23:42:46 -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 30513 invoked by uid 48); 22 Nov 2014 23:42:43 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/63971] Some of  gcc.target/aarch64/test_frame_*.c tests fail now
Date: Sat, 22 Nov 2014 23:42:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: testsuite
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-63971-4-GA2zhRxNf1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63971-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63971-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: 2014-11/txt/msg02576.txt.bz2
Content-length: 426

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc971

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.


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

* [Bug c++/64029] [4.9/5 Regression] const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault
  2014-11-22 22:48 [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault narayan_behera at hotmail dot com
@ 2014-11-23  1:21 ` redi at gcc dot gnu.org
  2014-11-24  9:10 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2014-11-23  1:21 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-23
      Known to work|                            |4.8.2
            Summary|const int                   |[4.9/5 Regression] const
                   |(&in)[]{1,2,3,4,5}; results |int (&in)[]{1,2,3,4,5};
                   |in internal compiler error: |results in internal
                   |Segmentation fault          |compiler error:
                   |                            |Segmentation fault
     Ever confirmed|0                           |1
      Known to fail|                            |4.9.2, 5.0


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

* [Bug c++/64029] [4.9/5 Regression] const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault
  2014-11-22 22:48 [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault narayan_behera at hotmail dot com
  2014-11-23  1:21 ` [Bug c++/64029] [4.9/5 Regression] " redi at gcc dot gnu.org
@ 2014-11-24  9:10 ` jakub at gcc dot gnu.org
  2014-11-24 17:00 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-24  9:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
   Target Milestone|---                         |4.9.3

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r208002.  The ICE is because the gimplifier sees a VAR_DECL with
const int[<unknown>] type (incomplete ARRAY_TYPE with no TYPE_SIZE*).


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

* [Bug c++/64029] [4.9/5 Regression] const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault
  2014-11-22 22:48 [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault narayan_behera at hotmail dot com
  2014-11-23  1:21 ` [Bug c++/64029] [4.9/5 Regression] " redi at gcc dot gnu.org
  2014-11-24  9:10 ` jakub at gcc dot gnu.org
@ 2014-11-24 17:00 ` rguenth at gcc dot gnu.org
  2014-12-04 20:38 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 17:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug c++/64029] [4.9/5 Regression] const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault
  2014-11-22 22:48 [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault narayan_behera at hotmail dot com
                   ` (2 preceding siblings ...)
  2014-11-24 17:00 ` rguenth at gcc dot gnu.org
@ 2014-12-04 20:38 ` jason at gcc dot gnu.org
  2014-12-04 20:48 ` [Bug c++/64029] [4.9 " jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-04 20:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Dec  4 20:37:30 2014
New Revision: 218402

URL: https://gcc.gnu.org/viewcvs?rev=218402&root=gcc&view=rev
Log:
    PR c++/64029
    * decl.c (grok_reference_init): Complete array type.

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


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

* [Bug c++/64029] [4.9 Regression] const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault
  2014-11-22 22:48 [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault narayan_behera at hotmail dot com
                   ` (3 preceding siblings ...)
  2014-12-04 20:38 ` jason at gcc dot gnu.org
@ 2014-12-04 20:48 ` jason at gcc dot gnu.org
  2015-01-07 15:18 ` jason at gcc dot gnu.org
  2015-01-07 20:02 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-04 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
      Known to work|                            |5.0
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
            Summary|[4.9/5 Regression] const    |[4.9 Regression] const int
                   |int (&in)[]{1,2,3,4,5};     |(&in)[]{1,2,3,4,5}; results
                   |results in internal         |in internal compiler error:
                   |compiler error:             |Segmentation fault
                   |Segmentation fault          |
      Known to fail|5.0                         |

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed on trunk for now.


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

* [Bug c++/64029] [4.9 Regression] const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault
  2014-11-22 22:48 [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault narayan_behera at hotmail dot com
                   ` (4 preceding siblings ...)
  2014-12-04 20:48 ` [Bug c++/64029] [4.9 " jason at gcc dot gnu.org
@ 2015-01-07 15:18 ` jason at gcc dot gnu.org
  2015-01-07 20:02 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2015-01-07 15:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Jan  7 15:18:16 2015
New Revision: 219307

URL: https://gcc.gnu.org/viewcvs?rev=219307&root=gcc&view=rev
Log:
    PR c++/64029
    * decl.c (grok_reference_init): Complete array type.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/g++.dg/cpp0x/initlist89.C
Modified:
    branches/gcc-4_9-branch/gcc/cp/ChangeLog
    branches/gcc-4_9-branch/gcc/cp/decl.c


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

* [Bug c++/64029] [4.9 Regression] const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault
  2014-11-22 22:48 [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault narayan_behera at hotmail dot com
                   ` (5 preceding siblings ...)
  2015-01-07 15:18 ` jason at gcc dot gnu.org
@ 2015-01-07 20:02 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2015-01-07 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.9.3.


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

end of thread, other threads:[~2015-01-07 20:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-22 22:48 [Bug c++/64029] New: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault narayan_behera at hotmail dot com
2014-11-23  1:21 ` [Bug c++/64029] [4.9/5 Regression] " redi at gcc dot gnu.org
2014-11-24  9:10 ` jakub at gcc dot gnu.org
2014-11-24 17:00 ` rguenth at gcc dot gnu.org
2014-12-04 20:38 ` jason at gcc dot gnu.org
2014-12-04 20:48 ` [Bug c++/64029] [4.9 " jason at gcc dot gnu.org
2015-01-07 15:18 ` jason at gcc dot gnu.org
2015-01-07 20:02 ` jason 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).