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 c++/80141] New: ICE with pragma omp declare


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

            Bug ID: 80141
           Summary: ICE with pragma omp declare
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

The following valid code snippet (compiled with -fopenmp)
triggers an ICE since GCC 4.9.0:

====================================================
#pragma omp declare simd aligned (p : 2 && 2)
template<int> void foo(int* p);
====================================================

bug.cc:2:46: internal compiler error: in cxx_eval_logical_expression, at
cp/constexpr.c:2528
 #pragma omp declare simd aligned (p : 2 && 2)
                                              ^
0x842cac cxx_eval_logical_expression
        ../../gcc/gcc/cp/constexpr.c:2528
0x83dd60 cxx_eval_constant_expression
        ../../gcc/gcc/cp/constexpr.c:4283
0x84444e cxx_eval_outermost_constant_expr
        ../../gcc/gcc/cp/constexpr.c:4637
0x847756 maybe_constant_value(tree_node*, tree_node*)
        ../../gcc/gcc/cp/constexpr.c:4852
0x7bb3c5 finish_omp_clauses(tree_node*, c_omp_region_type)
        ../../gcc/gcc/cp/semantics.c:6589
0x735350 cp_parser_omp_all_clauses
        ../../gcc/gcc/cp/parser.c:33479
0x724112 cp_parser_late_parsing_omp_declare_simd
        ../../gcc/gcc/cp/parser.c:36687
0x724112 cp_parser_late_return_type_opt
        ../../gcc/gcc/cp/parser.c:20550
0x724112 cp_parser_direct_declarator
        ../../gcc/gcc/cp/parser.c:19697
0x724112 cp_parser_declarator
        ../../gcc/gcc/cp/parser.c:19517
0x71c15c cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:19042
0x71d1ea cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:26711
0x73ef5c cp_parser_template_declaration_after_parameters
        ../../gcc/gcc/cp/parser.c:26315
0x73ebec cp_parser_explicit_template_declaration
        ../../gcc/gcc/cp/parser.c:26550
0x73ebec cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:26569
0x746d59 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:12445
0x748097 cp_parser_omp_declare_simd
        ../../gcc/gcc/cp/parser.c:36575
0x748097 cp_parser_omp_declare
        ../../gcc/gcc/cp/parser.c:37242
0x71815d cp_parser_pragma
        ../../gcc/gcc/cp/parser.c:38188
0x7488db cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:12367
Please submit a full bug report, [etc.]

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