blob: 41bb12e4a7345b5b05c5700481459b30bc1ba68a [file] [log] [blame]
John Kessenich38c507e2013-02-08 18:56:56 +00001#version 110
2
John Kessenich464f6d92013-02-06 00:14:16 +00003#define ON
4
5float sum = 0.0;
6
7void main()
8{
9
10#ifdef ON
11//yes
12sum += 1.0;
13#endif
14
15#ifdef OFF
16 //no
17 sum += 20.0;
18#endif
19
20 #if defined(ON)
21 //yes
22 sum += 300.0;
23 #endif
24
25 #if defined(OFF)
26 //no
27 sum += 4000.0;
28 #endif
29
30 #if !defined(ON)
31 //no
32 sum += 50000.0;
33 #endif
34
35 #if !defined(OFF)
36 //yes
37 sum += 600000.0;
38 #endif
39
40 #if defined (ON) && defined (OFF)
41//no
42sum += 7000000.0;
43 #endif
44
45#if defined ( ON ) && ! defined(OFF)
46//yes
47sum += 80000000.0;
48#endif
49
50#if defined(OFF) || defined(ON)
51//yes
52sum += 900000000.0;
53#endif
54
55// sum should be 980600301.0
56 gl_Position = vec4(sum);
57}
John Kessenichfcb4ed02013-12-30 20:34:28 +000058
59#define FUNC(a,b) a+b
60// needs to be last test in file due to syntax error
John Kessenich31a51be2016-07-19 14:32:52 -060061void foo986(){ FUNC( (((2)))), 4); } // ERROR, too few arguments )