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++/62199] New: ICE with -Wlogical-not-parentheses


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

            Bug ID: 62199
           Summary: ICE with -Wlogical-not-parentheses
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org

int
foo (int a, int b)
{
  return !a || b == 10;
}

$ ./cc1plus -quiet p.C -Wlogical-not-parentheses
p.C: In function âint foo(int, int)â:
p.C:4:21: internal compiler error: tree check: expected class âexpressionâ,
have âdeclarationâ (parm_decl) in tree_operand_check, at tree.h:3186
   return !a || b == 10;
                     ^
0xe16466 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
    /home/marek/src/gcc/gcc/tree.c:9200
0x506884 expr_check
    /home/marek/src/gcc/gcc/tree.h:2898
0x506884 tree_operand_check
    /home/marek/src/gcc/gcc/tree.h:3186
0x585a9c tree_operand_check(tree_node*, int, char const*, int, char const*)
    /home/marek/src/gcc/gcc/tree.h:3174
0x6773ee cp_parser_binary_expression
    /home/marek/src/gcc/gcc/cp/parser.c:8130
0x677807 cp_parser_assignment_expression
    /home/marek/src/gcc/gcc/cp/parser.c:8274
[...]

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