Skip to content

Commit e306db0

Browse files
authored
[Flang] Fix test case for AIX(big-endian) system for issuing an extra message. (#104792)
The 10-byte FP on big-endian system such as AIX is not represented as a valid number in FE, so Flang issues an extra WARNING message as `underflow on REAL(10) to REAL(4) conversion` for `_10` for such a number. This PR is to fix the test case.
1 parent 4e332bb commit e306db0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flang/test/Semantics/kinds04_q16.f90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
! RUN: %python %S/test_errors.py %s %flang_fc1
1+
! RUN: not %flang_fc1 %s 2>%t.stderr
2+
! RUN: FileCheck %s --input-file=%t.stderr --check-prefixes=%if system-aix %{"PORTABILITY","WARNING","ERROR","AIX_WARNING"%} %else %{"PORTABILITY","WARNING","ERROR"%}
23
! C716 If both kind-param and exponent-letter appear, exponent-letter
34
! shall be E. (As an extension we also allow an exponent-letter which matches
45
! the kind-param)
@@ -15,10 +16,12 @@ subroutine s(var)
1516
!PORTABILITY: Explicit kind parameter together with non-'E' exponent letter is not standard
1617
real :: realvar4 = 4.0D6_8
1718
!WARNING: Explicit kind parameter on real constant disagrees with exponent letter 'q'
19+
!AIX_WARNING: underflow on REAL(10) to REAL(4) conversion
1820
real :: realvar5 = 4.0Q6_10
1921
!PORTABILITY: Explicit kind parameter together with non-'E' exponent letter is not standard
2022
real :: realvar6 = 4.0Q6_16
2123
real :: realvar7 = 4.0E6_8
24+
!AIX_WARNING: underflow on REAL(10) to REAL(4) conversion
2225
real :: realvar8 = 4.0E6_10
2326
real :: realvar9 = 4.0E6_16
2427
!ERROR: Unsupported REAL(KIND=32)
@@ -32,6 +35,7 @@ subroutine s(var)
3235
!PORTABILITY: Explicit kind parameter together with non-'E' exponent letter is not standard
3336
double precision :: doublevar5 = 4.0Q6_16
3437
double precision :: doublevar6 = 4.0E6_8
38+
!AIX_WARNING: underflow on REAL(10) to REAL(8) conversion
3539
double precision :: doublevar7 = 4.0E6_10
3640
double precision :: doublevar8 = 4.0E6_16
3741
!ERROR: Unsupported REAL(KIND=32)

0 commit comments

Comments
 (0)