This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/62008] New: CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer.


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

            Bug ID: 62008
           Summary: CilkPlus Array Notation ICE in
                    build_array_notation_ref when trying to build  a
                    multidimensional array from a pointer.
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nick.tomlinson at arm dot com
              Host: x86_64-unknown-linux-gnu
            Target: x86_64-unknown-linux-gnu
             Build: r213543

Created attachment 33234
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33234&action=edit
Minimal reproducer

==== Steps to reproduce ====
    - Build with: g++ -fcilkplus -c multidim.cpp
    - Observe that an ICE is produced.

  ==== What I expected to happen ====
    - g++ should compile the code without generating an ICE or any other error
      (I *think* the code is valid).

  ==== What actually happened ====
    - Trunk g++ produced the following output:
      $ ${GCC_TRUNK}/bin/g++ -fcilkplus -c multidim.cpp
      multidim.cpp: In function 'void f(int*, int, int)':
      multidim.cpp:4:25: internal compiler error: in build_array_notation_ref,
at cp/cp-array-notation.c:1407
    tmp[:][:] = a[0:w][0:h];
                  ^
      0x74ee4a build_array_notation_ref(unsigned int, tree_node*, tree_node*,
tree_node*, tree_node*, tree_node*)
         
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/cp-array-notation.c:1407
      0x661549 cp_parser_array_notation
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6388
      0x661549 cp_parser_postfix_open_square_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6453
      0x661549 cp_parser_postfix_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6053
      0x664558 cp_parser_unary_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:7293
      0x665189 cp_parser_binary_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8036
      0x66575b cp_parser_assignment_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8279
      0x665bf5 cp_parser_assignment_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8329
      0x665bf5 cp_parser_constant_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8539
      0x665936 cp_parser_assignment_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8298
      0x667e03 cp_parser_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8441
      0x66862c cp_parser_expression
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8480
      0x66862c cp_parser_expression_statement
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9819
      0x65d1d8 cp_parser_statement
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9670
      0x65dfe9 cp_parser_statement_seq_opt
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9942
      0x65e156 cp_parser_compound_statement
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9896
      0x66f64b cp_parser_function_body
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:18961
      0x66f64b cp_parser_ctor_initializer_opt_and_function_body
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:18997
      0x675cf3 cp_parser_function_definition_after_declarator
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:23162
      0x676bae cp_parser_function_definition_from_specifiers_and_declarator
          /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:23074
      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.

  ==== Environment ====
  I have tried this with:
   - My system GCC (g++, version 4.9.1)
   - A native build of GCC (${GCC_TRUNK}/bin/g++, revision r213543)
   - I have also seen an ICE for the same code in revision r213234.

  ${GCC_TRUNK}/bin/g++ is a native build of GCC, with the following specified
  to the configure script:
  ./configure --prefix=${GCC_TRUNK} \
    --enable-languages=c,c++,fortran --disable-sjlj-exceptions
  And make invoked as: make CXXFLAGS="-g3 -O0" -j9

  $ uname -a
  Linux squamata 3.15.7-1-ARCH #1 SMP PREEMPT Mon Jul 28 20:06:17 CEST 2014
x86_64 GNU/Linux

  $ g++ --version
  g++ (GCC) 4.9.1
  Copyright (C) 2014 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  $ ${GCC_TRUNK}/bin/g++ --version
  g++ (GCC) 4.10.0 20140804 (experimental)
  Copyright (C) 2014 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]