libgcc: Fix a warning/error in libgcc2.c [PR117624]
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 991112-1.c
blobaeb1a334440a4faa2c09472a2fc3f1542ca09f49
1 /* This code was miscompiled at -O3 on x86.
2 Reported by Jim Meyering; distilled from bash. */
4 void abort(void);
5 int isprint (int);
7 int rl_show_char (int c) { return 0; }
9 int rl_character_len (int c, int pos)
11 return isprint (c) ? 1 : 2;
14 int main(void)
16 int (*x)(int, int) = rl_character_len;
17 if (x('a', 1) != 1)
18 abort();
19 if (x('\002', 1) != 2)
20 abort();
21 return 0;