public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf
@ 2015-04-10 21:47 doko at gcc dot gnu.org
  2015-04-10 21:47 ` [Bug c++/65736] " doko at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2015-04-10 21:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65736
           Summary: [5 Regression] ICE (in process_init_constructor_array,
                    at cp/typeck2.c:1263) on arm-linux-gnueabihf
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

Created attachment 35291
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35291&action=edit
preprocessed source

$ cat TLCS900h_registers.ii
typedef char uint8;
int gprBank[1];
uint8 *gprMapB[] {
(uint8 *)&gprBank[0] + 1

$ g++ -c -g -O2 TLCS900h_registers.ii
TLCS900h_registers.ii:3:18: warning: extended initializer lists only available
w
ith -std=c++11 or -std=gnu++11
 uint8 *gprMapB[] {
                  ^
TLCS900h_registers.ii:4:24: error: expected '}' at end of input
 (uint8 *)&gprBank[0] + 1
                        ^
TLCS900h_registers.ii:4:24: internal compiler error: in
process_init_constructor_array, at cp/typeck2.c:1263
0x1f68c1 process_init_constructor_array
        ../../src/gcc/cp/typeck2.c:1262
0x1f68c1 process_init_constructor
        ../../src/gcc/cp/typeck2.c:1560
0x1f68c1 digest_init_r
        ../../src/gcc/cp/typeck2.c:1094
0x1f7e1f digest_init_flags(tree_node*, tree_node*, int)
        ../../src/gcc/cp/typeck2.c:1139
0x1f7e1f store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../src/gcc/cp/typeck2.c:813
0x18a567 check_initializer
        ../../src/gcc/cp/decl.c:6004
0x1a71bb cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../src/gcc/cp/decl.c:6616
0x253863 cp_parser_init_declarator
        ../../src/gcc/cp/parser.c:17299
0x2546cf cp_parser_simple_declaration
        ../../src/gcc/cp/parser.c:11607
0x23e8a7 cp_parser_block_declaration
        ../../src/gcc/cp/parser.c:11481
0x25e0eb cp_parser_declaration
        ../../src/gcc/cp/parser.c:11378
0x25cf25 cp_parser_declaration_seq_opt
        ../../src/gcc/cp/parser.c:11264
0x25d195 cp_parser_translation_unit
        ../../src/gcc/cp/parser.c:4100
0x25d195 c_parse_file()
        ../../src/gcc/cp/parser.c:33192
0x34830f c_common_parse_file()
        ../../src/gcc/c-family/c-opts.c:1057
Please submit a full bug report,
with preprocessed source if appropriate.


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
@ 2015-04-10 21:47 ` doko at gcc dot gnu.org
  2015-04-10 22:04 ` doko at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2015-04-10 21:47 UTC (permalink / raw)
  To: gcc-bugs

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Target|                            |arm-linux-gnueabihf
      Known to work|                            |4.9.2
      Known to fail|                            |5.0

--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> ---
probably reduced too much, the reduced test case isn't valid code anymore.


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
  2015-04-10 21:47 ` [Bug c++/65736] " doko at gcc dot gnu.org
@ 2015-04-10 22:04 ` doko at gcc dot gnu.org
  2015-04-10 23:20 ` [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) doko at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2015-04-10 22:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Matthias Klose <doko at gcc dot gnu.org> ---
typedef char uint8;
int gprBank[1];
uint8 *gprMapB[] { (uint8 *)&gprBank[0] + 1 }


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263)
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
  2015-04-10 21:47 ` [Bug c++/65736] " doko at gcc dot gnu.org
  2015-04-10 22:04 ` doko at gcc dot gnu.org
@ 2015-04-10 23:20 ` doko at gcc dot gnu.org
  2015-04-10 23:35 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2015-04-10 23:20 UTC (permalink / raw)
  To: gcc-bugs

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|arm-linux-gnueabihf         |
            Summary|[5 Regression] ICE (in      |[5 Regression] ICE (in
                   |process_init_constructor_ar |process_init_constructor_ar
                   |ray, at cp/typeck2.c:1263)  |ray, at cp/typeck2.c:1263)
                   |on arm-linux-gnueabihf      |

--- Comment #3 from Matthias Klose <doko at gcc dot gnu.org> ---
fails on x86_64-linux-gnu as well.


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263)
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-04-10 23:20 ` [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) doko at gcc dot gnu.org
@ 2015-04-10 23:35 ` jakub at gcc dot gnu.org
  2015-04-10 23:36 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-10 23:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Just -std=c++11 is needed:
int a[1];
char *b[1] { (char *)&a[0] + 1 };
Started to ICE with r221777.


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263)
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-04-10 23:35 ` jakub at gcc dot gnu.org
@ 2015-04-10 23:36 ` jakub at gcc dot gnu.org
  2015-04-11  8:39 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-10 23:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-04-10
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263)
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-04-10 23:36 ` jakub at gcc dot gnu.org
@ 2015-04-11  8:39 ` jakub at gcc dot gnu.org
  2015-04-11 17:34 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-11  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 35299
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35299&action=edit
gcc5-pr65736.patch

Untested fix.


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263)
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-04-11  8:39 ` jakub at gcc dot gnu.org
@ 2015-04-11 17:34 ` jakub at gcc dot gnu.org
  2015-04-12 19:11 ` jakub at gcc dot gnu.org
  2015-04-12 19:12 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-11 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263)
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-04-11 17:34 ` jakub at gcc dot gnu.org
@ 2015-04-12 19:11 ` jakub at gcc dot gnu.org
  2015-04-12 19:12 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-12 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Sun Apr 12 19:10:58 2015
New Revision: 222022

URL: https://gcc.gnu.org/viewcvs?rev=222022&root=gcc&view=rev
Log:
    PR c++/65736
    * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
    don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
    the expression to the original type at the end.

    * g++.dg/cpp0x/pr65736.C: New test.

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


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

* [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263)
  2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-04-12 19:11 ` jakub at gcc dot gnu.org
@ 2015-04-12 19:12 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-12 19:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-04-12 19:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 21:47 [Bug c++/65736] New: [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) on arm-linux-gnueabihf doko at gcc dot gnu.org
2015-04-10 21:47 ` [Bug c++/65736] " doko at gcc dot gnu.org
2015-04-10 22:04 ` doko at gcc dot gnu.org
2015-04-10 23:20 ` [Bug c++/65736] [5 Regression] ICE (in process_init_constructor_array, at cp/typeck2.c:1263) doko at gcc dot gnu.org
2015-04-10 23:35 ` jakub at gcc dot gnu.org
2015-04-10 23:36 ` jakub at gcc dot gnu.org
2015-04-11  8:39 ` jakub at gcc dot gnu.org
2015-04-11 17:34 ` jakub at gcc dot gnu.org
2015-04-12 19:11 ` jakub at gcc dot gnu.org
2015-04-12 19:12 ` jakub 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).