1 // RUN: %clang_cc1 -std=c++11 -verify %s
3 void test_0(int *List
, int Length
) {
4 /* expected-error@+1 {{missing option; expected 'contract', 'reassociate', 'reciprocal', or 'exceptions'}} */
6 for (int i
= 0; i
< Length
; i
++) {
10 void test_1(int *List
, int Length
) {
11 /* expected-error@+1 {{invalid option 'blah'; expected 'contract', 'reassociate', 'reciprocal', or 'exceptions'}} */
13 for (int i
= 0; i
< Length
; i
++) {
18 void test_3(int *List
, int Length
) {
19 /* expected-error@+1 {{expected '('}} */
20 #pragma clang fp contract on
21 for (int i
= 0; i
< Length
; i
++) {
26 void test_4(int *List
, int Length
) {
27 /* expected-error@+1 {{unexpected argument 'while' to '#pragma clang fp contract'; expected 'fast' or 'on' or 'off'}} */
28 #pragma clang fp contract(while)
29 for (int i
= 0; i
< Length
; i
++) {
34 void test_5(int *List
, int Length
) {
35 /* expected-error@+1 {{unexpected argument 'maybe' to '#pragma clang fp contract'; expected 'fast' or 'on' or 'off'}} */
36 #pragma clang fp contract(maybe)
37 for (int i
= 0; i
< Length
; i
++) {
42 void test_6(int *List
, int Length
) {
43 /* expected-error@+1 {{expected ')'}} */
44 #pragma clang fp contract(fast
45 for (int i
= 0; i
< Length
; i
++) {
50 void test_7(int *List
, int Length
) {
51 /* expected-warning@+1 {{extra tokens at end of '#pragma clang fp' - ignored}} */
52 #pragma clang fp contract(fast) *
53 for (int i
= 0; i
< Length
; i
++) {
58 void test_8(int *List
, int Length
) {
59 for (int i
= 0; i
< Length
; i
++) {
61 /* expected-error@+1 {{'#pragma clang fp' can only appear at file scope or at the start of a compound statement}} */
62 #pragma clang fp contract(fast)
66 void test_9(float *dest
, float a
, float b
) {
67 /* expected-error@+1 {{unexpected argument 'on' to '#pragma clang fp exceptions'; expected 'ignore', 'maytrap' or 'strict'}} */
68 #pragma clang fp exceptions(on)
72 void test_10(float *dest
, float a
, float b
) {
73 #pragma clang fp exceptions(maytrap) contract(fast) reassociate(on)