Skip to content

Core dump on switch statement #55

Description

@nbkolchin

cparser segfaults on following code:

int main(void){
        int i = 0;
        switch(i){
                i = i + ({case 0:; 0;});
        }
        return 0;
}
$ ./cparser/build/debug/cparser -m32 switch0.c
switch0.c:4:17: warning: statement is unreachable [-Wunreachable-code]
Verify warning: Block BB[52:3](main[54]): not reachable by blockwalker (endless loop with no kept block?)
Verify warning: Block BB[52:3](main[54]): no cfopt in block

Program received signal SIGABRT, Aborted.
$ ./cparser/build/debug/cparser --version
cparser 1.22.1(8ec1a761bf62be1028632e5eceda425d9fbeb039) using libFirm 1.22(b7f2ed734453a3185d07738016119544da27b9e8)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions