Commit c2b83946 by Zack Weinberg

Test for optimizer bug with -finline-functions.

Reported by Jim Meyering; distilled from bash.

From-SVN: r30517
parent 3db377a9
/* This code was miscompiled at -O3 on x86.
Reported by Jim Myering; distilled from bash. */
int rl_show_char (int c) { return 0; }
int rl_character_len (int c, int pos)
{
return isprint (c) ? 1 : 2;
}
int main(void)
{
int (*x)(int, int) = rl_character_len;
if (x('a', 1) != 1)
abort();
if (x('\002', 1) != 2)
abort();
return 0;
}
Markdown is supported
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