Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / badly-typed-intrinsic.f90
blob532ef37466190112329c9bc27dd8eaa1151ca440
1 ! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s
3 type :: t
4 end type
5 integer :: acos
6 double precision :: cos
7 !CHECK: Explicit type declaration ignored for intrinsic function 'int'
8 complex :: int
9 character :: sin
10 logical :: asin
11 type(t) :: atan
12 !CHECK: INTRINSIC statement for explicitly-typed 'int'
13 intrinsic int
14 !CHECK: The result type 'REAL(4)' of the intrinsic function 'acos' is not the explicit declared type 'INTEGER(4)'
15 !CHECK: Ignored declaration of intrinsic function 'acos'
16 print *, acos(0.)
17 !CHECK: The result type 'REAL(4)' of the intrinsic function 'cos' is not the explicit declared type 'REAL(8)'
18 !CHECK: Ignored declaration of intrinsic function 'cos'
19 print *, cos(0.)
20 !CHECK: The result type 'REAL(4)' of the intrinsic function 'sin' is not the explicit declared type 'CHARACTER(KIND=1,LEN=1_8)'
21 !CHECK: Ignored declaration of intrinsic function 'sin'
22 print *, sin(0.)
23 !CHECK: The result type 'REAL(4)' of the intrinsic function 'asin' is not the explicit declared type 'LOGICAL(4)'
24 !CHECK: Ignored declaration of intrinsic function 'asin'
25 print *, asin(0.)
26 !CHECK: The result type 'REAL(4)' of the intrinsic function 'atan' is not the explicit declared type 't'
27 !CHECK: Ignored declaration of intrinsic function 'atan'
28 print *, atan(0.)
29 end