Project

General

Profile

Actions

Bug #332

open

Alias analyzer doesn't alias int with volatile int!

Added by Pavel Shved over 14 years ago. Updated about 13 years ago.

Status:
Open
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
08/03/2010
Due date:
% Done:

0%

Estimated time:
Detected in build:
pre-ldv
Platform:
Published in build:

Description

For this program *p is not aliased with a, and BLAST reports an unsafe.

int main()
{
        int volatile a = 4;
        int * const p = &a;
        p = &a;
        a = a - 4;
        if (*p != 0){
                ERROR: goto ERROR;
        }
        return 0;
}

If we remove volatile qualifier, the types--as BLAST understands them--start to match, and the program passes.

Actions

Also available in: Atom PDF