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

Heinrich Schuchardt <xypron.glpk at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xypron.glpk at gmx dot de

--- Comment #2 from Heinrich Schuchardt <xypron.glpk at gmx dot de> ---
Hello Andrew,

Thank you for looking into this.

#include <stdio.h>

void *test(unsigned x) {
  printf("%p\n", &x);

  asm("" : "=g"(x) : "0b"(&x));
}

int main()
{
        void *p;

        p = test(123);
        printf("%p\n", p);

        return 0;
}

compiles fine and results in something like:

$ gcc test.c -o test && ./test
0x7fffc7f5404c
0x7fffc7f5404c

How did you reproduce the error with your reduced code?

Best regards

Heinrich

Reply via email to