Bug ID: 77694
           Summary: ICE in optimize_binop_array_assignment, at
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot
  Target Milestone: ---

Invalid code with an unknown operator (here .nt. instead of .not.).
For versions down to at least 4.8, at -Og, -Os, -O1 or higher.
No ICE with option -fno-frontend-optimize.

$ cat z1.f90
program p
   logical :: x(2), y(2)
   x = .true.
   y = .nt. x

$ cat z2.f90
program p
   logical :: x, y(2)
   x = .true.
   y = .nt. x

$ gfortran-7-20160918 -O2 z1.f90

    y = .nt. x
Error: Unknown operator 'nt' at (1)
f951: internal compiler error: Segmentation fault
0xc21a5f crash_signal
0x7b3550 optimize_binop_array_assignment
0x7b44ae optimize_assignment
0x7b44ae optimize_code
0x7b6ea9 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
0x7b7f04 optimize_namespace
0x7b80c0 gfc_run_passes(gfc_namespace*)
0x6f2287 gfc_resolve(gfc_namespace*)
0x6dd21a resolve_all_program_units
0x6dd21a gfc_parse_file()
0x71faa2 gfc_be_parse_file

Reply via email to