brintos

brintos / llvm-project-archived public Read only

0
0
Text · 962 B · 0192f83 Raw
41 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Testing 7.6 enum3 4  ! OK5  enum, bind(C)6    enumerator :: red, green7    enumerator blue, pink8    enumerator yellow9    enumerator :: purple = 210  end enum11 12  integer(yellow) anint413 14  enum, bind(C)15    enumerator :: square, cicrle16    !ERROR: 'square' is already declared in this scoping unit17    enumerator square18  end enum19 20  dimension :: apple(4)21  real :: peach22 23  enum, bind(C)24    !ERROR: 'apple' is already declared in this scoping unit25    enumerator :: apple26    enumerator :: pear27    !ERROR: 'peach' is already declared in this scoping unit28    enumerator :: peach29    !ERROR: 'red' is already declared in this scoping unit30    enumerator :: red31  end enum32 33  enum, bind(C)34    !ERROR: Enumerator value could not be computed from the given expression35    !WARNING: INTEGER(4) division by zero [-Wfolding-exception]36    !ERROR: Must be a constant value37    enumerator :: wrong = 0/038  end enum39 40end41