101 lines · plain
1! Test range options for complex multiplication and division.2 3! RUN: %flang -### -c %s 2>&1 \4! RUN: | FileCheck %s --check-prefix=RANGE5 6! RUN: %flang -### -fcomplex-arithmetic=full -c %s 2>&1 \7! RUN: | FileCheck %s --check-prefix=FULL8 9! RUN: %flang -### -fcomplex-arithmetic=improved -c %s 2>&1 \10! RUN: | FileCheck %s --check-prefix=IMPRVD11 12! RUN: %flang -### -fcomplex-arithmetic=basic -c %s 2>&1 \13! RUN: | FileCheck %s --check-prefix=BASIC14 15! RUN: not %flang -### -fcomplex-arithmetic=foo -c %s 2>&1 \16! RUN: | FileCheck %s --check-prefix=ERR17 18! RUN: %flang -### -ffast-math -c %s 2>&1 \19! RUN: | FileCheck %s --check-prefix=BASIC20 21! RUN: %flang -### -fno-fast-math -c %s 2>&1 \22! RUN: | FileCheck %s --check-prefix=RANGE23 24! RUN: %flang -### -Werror -ffast-math -fno-fast-math -c %s 2>&1 \25! RUN: | FileCheck --check-prefixes=RANGE %s26 27! RUN: %flang -### -ffast-math -fcomplex-arithmetic=full -c %s 2>&1 \28! RUN: | FileCheck --check-prefixes=FULL,ARITH-FULL-OVERRIDING,FAST-OVERRIDDEN %s29 30! RUN: %flang -### -ffast-math -fcomplex-arithmetic=improved -c %s 2>&1 \31! RUN: | FileCheck --check-prefixes=IMPRVD,ARITH-IMPROVED-OVERRIDING,FAST-OVERRIDDEN %s32 33! RUN: %flang -### -Werror -ffast-math -fcomplex-arithmetic=basic -c %s 2>&1 \34! RUN: | FileCheck --check-prefixes=BASIC %s35 36! RUN: %flang -### -Werror -fno-fast-math -ffast-math -c %s 2>&1 \37! RUN: | FileCheck --check-prefixes=BASIC %s38 39! RUN: %flang -### -Werror -fno-fast-math -fcomplex-arithmetic=full -c %s 2>&1 \40! RUN: | FileCheck --check-prefixes=FULL %s41 42! RUN: %flang -### -Werror -fno-fast-math -fcomplex-arithmetic=improved -c %s 2>&1 \43! RUN: | FileCheck --check-prefixes=IMPRVD %s44 45! RUN: %flang -### -Werror -fno-fast-math -fcomplex-arithmetic=basic -c %s 2>&1 \46! RUN: | FileCheck --check-prefixes=BASIC %s47 48! RUN: %flang -### -fcomplex-arithmetic=full -ffast-math -c %s 2>&1 \49! RUN: | FileCheck --check-prefixes=BASIC,FAST-OVERRIDING,ARITH-FULL-OVERRIDDEN %s50 51! RUN: %flang -### -Werror -fcomplex-arithmetic=full -fno-fast-math -c %s 2>&1 \52! RUN: | FileCheck --check-prefixes=RANGE %s53 54! RUN: %flang -### -Werror -fcomplex-arithmetic=full -fcomplex-arithmetic=improved -c %s 2>&1 \55! RUN: | FileCheck --check-prefixes=IMPRVD %s56 57! RUN: %flang -### -Werror -fcomplex-arithmetic=full -fcomplex-arithmetic=basic -c %s 2>&1 \58! RUN: | FileCheck --check-prefixes=BASIC %s59 60! RUN: %flang -### -fcomplex-arithmetic=improved -ffast-math -c %s 2>&1 \61! RUN: | FileCheck --check-prefixes=BASIC,FAST-OVERRIDING,ARITH-IMPROVED-OVERRIDDEN %s62 63! RUN: %flang -### -fcomplex-arithmetic=improved -fno-fast-math -c %s 2>&1 \64! RUN: | FileCheck --check-prefixes=RANGE,NOFAST-OVERRIDING,ARITH-IMPROVED-OVERRIDDEN %s65 66! RUN: %flang -### -Werror -fcomplex-arithmetic=improved -fcomplex-arithmetic=full -c %s 2>&1 \67! RUN: | FileCheck --check-prefixes=FULL %s68 69! RUN: %flang -### -Werror -fcomplex-arithmetic=improved -fcomplex-arithmetic=basic -c %s 2>&1 \70! RUN: | FileCheck --check-prefixes=BASIC %s71 72! RUN: %flang -### -Werror -fcomplex-arithmetic=basic -ffast-math -c %s 2>&1 \73! RUN: | FileCheck --check-prefixes=BASIC %s74 75! RUN: %flang -### -fcomplex-arithmetic=basic -fno-fast-math -c %s 2>&1 \76! RUN: | FileCheck --check-prefixes=RANGE,NOFAST-OVERRIDING,ARITH-BASIC-OVERRIDDEN %s77 78! RUN: %flang -### -Werror -fcomplex-arithmetic=basic -fcomplex-arithmetic=full -c %s 2>&1 \79! RUN: | FileCheck --check-prefixes=FULL %s80 81! RUN: %flang -### -Werror -fcomplex-arithmetic=basic -fcomplex-arithmetic=improved -c %s 2>&1 \82! RUN: | FileCheck --check-prefixes=IMPRVD %s83 84 85! FAST-OVERRIDING: warning: '-ffast-math' sets complex range to "basic"86! NOFAST-OVERRIDING: warning: '-fno-fast-math' sets complex range to "none"87! ARITH-FULL-OVERRIDING: warning: '-fcomplex-arithmetic=full' sets complex range to "full"88! ARITH-IMPROVED-OVERRIDING: warning: '-fcomplex-arithmetic=improved' sets complex range to "improved"89 90! FAST-OVERRIDDEN: overriding the setting of "basic" that was implied by '-ffast-math' [-Woverriding-complex-range]91! ARITH-FULL-OVERRIDDEN: overriding the setting of "full" that was implied by '-fcomplex-arithmetic=full' [-Woverriding-complex-range]92! ARITH-IMPROVED-OVERRIDDEN: overriding the setting of "improved" that was implied by '-fcomplex-arithmetic=improved' [-Woverriding-complex-range]93! ARITH-BASIC-OVERRIDDEN: overriding the setting of "basic" that was implied by '-fcomplex-arithmetic=basic' [-Woverriding-complex-range]94 95! RANGE-NOT: -complex-range=96! FULL: -complex-range=full97! IMPRVD: -complex-range=improved98! BASIC: -complex-range=basic99 100! ERR: error: unsupported argument 'foo' to option '-fcomplex-arithmetic='101