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

            Bug ID: 58703
           Summary: [4.9 Regression] ICE with invalid types in OpenMP
                    declare reduction clause
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet (compiled with "-fopenmp") triggers an ICE
on trunk:

====================================================================
#pragma omp declare reduction (+ : char[] : omp_out += omp_in)
#pragma omp declare reduction (+ : char() : omp_out += omp_in)
====================================================================

bug.cc:1:36: error: function or array type 'char []' in '#pragma omp declare
reduction'
 #pragma omp declare reduction (+ : char[] : omp_out += omp_in)
                                    ^
bug.cc:2:36: error: function or array type 'char()' in '#pragma omp declare
reduction'
 #pragma omp declare reduction (+ : char() : omp_out += omp_in)
                                    ^
bug.cc:2:63: internal compiler error: in cp_parser_translation_unit, at
cp/parser.c:4019
 #pragma omp declare reduction (+ : char() : omp_out += omp_in)
                                                               ^
0x66b3b0 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4018
0x66b3b0 c_parse_file()
        ../../gcc/gcc/cp/parser.c:30962
0x787f73 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]

Reply via email to