This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/84046] [6/7/8 Regression] global zero-sized objects may have same address


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Zero sized objects of course can have the same address and always had.
Just in your testcase the comparison used to be optimized away before r218462.
If you hide it from the optimizers, like with:
        int *p = a;
        int *q = b;
        asm ("" : "+r" (p), "+r" (q));
        if(p == q) __builtin_abort ();
you'll get aborts all the way to r104500 (oldest revision I have around).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]