Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lang / c / set_values / main.c
blob64474c275a09142878427ed977be46096b7c82fa
1 #include <stdio.h>
3 void set_char(void)
5 char i = 'a';
6 printf("before (char) i = %c\n", i);
7 printf("after (char) i = %c\n", i); // Set break point #1. //// break $source:$line
10 void set_uchar(void)
12 unsigned char i = 'a';
13 printf("before (unsigned char) i = %c\n", i);
14 printf("after (unsigned char) i = %c\n", i); //// break $source:$line
17 void set_short(void)
19 short i = 33;
20 printf("before (short) i = %i\n", i);
21 printf("after (short) i = %i\n", i); //// break $source:$line
24 void set_ushort(void)
26 unsigned short i = 33;
27 printf("before (unsigned short) i = %i\n", i);
28 printf("after (unsigned short) i = %i\n", i); // Set break point #2. //// break $source:$line
31 void set_int(void)
33 int i = 33;
34 printf("before (int) i = %i\n", i);
35 printf("after (int) i = %i\n", i); //// break $source:$line
38 void set_uint(void)
40 unsigned int i = 33;
41 printf("before (unsigned int) i = %u\n", i);
42 printf("after (unsigned int) i = %u\n", i); //// break $source:$line
45 void set_long(void)
47 long i = 33;
48 printf("before (long) i = %li\n", i);
49 printf("after (long) i = %li\n", i); // Set break point #3. //// break $source:$line
52 void set_ulong(void)
54 unsigned long i = 33;
55 printf("before (unsigned long) i = %lu\n", i);
56 printf("after (unsigned long) i = %lu\n", i); //// break $source:$line
59 void set_float(void)
61 float i = 2.25;
62 printf("before (float) i = %g\n", i);
63 printf("after (float) i = %g\n", i); //// break $source:$line
66 void set_double(void)
68 double i = 2.25;
69 printf("before (double) i = %g\n", i);
70 printf("after (double) i = %g\n", i); // Set break point #4. //// break $source:$line
73 void set_long_double(void)
75 long double i = 2.25;
76 printf("before (long double) i = %Lg\n", i);
77 printf("after (long double) i = %Lg\n", i); // Set break point #5. //// break $source:$line
80 void set_point (void)
82 struct point_tag {
83 int x;
84 int y;
86 struct point_tag points_2[2] = {
87 {1,2},
88 {3,4}
92 int main (int argc, char const *argv[])
94 // Continue to the breakpoint in set_char()
95 set_char(); //// continue; var i; val -set 99 1
96 set_uchar(); //// continue; var i; val -set 99 2
97 set_short(); //// continue; var i; val -set -42 3
98 set_ushort(); //// continue; var i; val -set 42 4
99 set_int(); //// continue; var i; val -set -42 5
100 set_uint(); //// continue; var i; val -set 42 6
101 set_long(); //// continue; var i; val -set -42 7
102 set_ulong(); //// continue; var i; val -set 42 8
103 set_float(); //// continue; var i; val -set 123.456 9
104 set_double(); //// continue; var i; val -set 123.456 10
105 set_long_double(); //// continue; var i; val -set 123.456 11
106 set_point (); //// continue
107 return 0;