Skip to content

subreg regalloc miscompile #9485

@regehr

Description

@regehr
Bugzilla Link 9113
Resolution DUPLICATE
Resolved on Feb 13, 2011 14:56
Version trunk
OS Linux
CC @atrick,@lattner,@tkremenek,@stoklund

Extended Description

[regehr@gamow tmp447]$ clang -O0 small.c -o small
[regehr@gamow tmp447]$ ./small
1
[regehr@gamow tmp447]$ clang -O1 small.c -o small
[regehr@gamow tmp447]$ ./small
169
[regehr@gamow tmp447]$ clang -v

clang version 2.9 (trunk 124573)
Target: x86_64-unknown-linux-gnu
Thread model: posix

[regehr@gamow tmp447]$ cat small.c

int printf(const char *format, ...);

char g_14 = 0;

int main(void) {
unsigned int l_1 = 0;
unsigned char l_2 = 0;
l_1 = (g_14 / 5) != (unsigned char)g_14;
l_2 = l_1 + ((1 + g_14) ^ g_14);
printf("%d\n", l_2);
return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilladuplicateResolved as duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions