Commit 2966858f authored by Xavier Leroy's avatar Xavier Leroy
Browse files

Add regression test for issue #211

parent 03538a45
......@@ -12,9 +12,10 @@ TESTS=int32 int64 floats floats-basics \
expr1 expr6 funptr2 initializers initializers2 initializers3 \
volatile1 volatile2 volatile3 volatile4 \
funct3 expr5 struct7 struct8 struct11 struct12 casts1 casts2 char1 \
sizeof1 sizeof2 binops bool for1 switch switch2 compound \
sizeof1 sizeof2 binops bool for1 for2 switch switch2 compound \
decl1 interop1 bitfields9 ptrs3 \
parsing krfun
# Can run, but only in compiled mode, and have reference output in Results
TESTS_COMP=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \
......
Value of 'press' should be 100, is: 100
/* Issue #211 */
#include <stdio.h>
int press = 100;
int valve = 0;
int main (void) {
for (int press = 0; press < 3; press++) {
valve++;
}
printf ("Value of 'press' should be 100, is: %d\n", press);
return valve - 3;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment