[Bug c/71746] New: Scope Variable Address (Stack) Mismatch

mfurkanuslu at openmailbox dot org gcc-bugzilla@gcc.gnu.org
Mon Jul 4 01:11:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71746

            Bug ID: 71746
           Summary: Scope Variable Address (Stack) Mismatch
           Product: gcc
           Version: 5.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mfurkanuslu at openmailbox dot org
  Target Milestone: ---

int main()
{
    int* ptr;
    {
        int svar = 13;
        ptr = &svar;
    }
    int mvar = 144;
    printf("%d\n", *ptr);

output is 13 but if i add this line (after or before printf)

int* p = &mvar;

output is 144.


More information about the Gcc-bugs mailing list