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 tree-optimization/64328] New: addr_equal-1.c fails execution.


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

            Bug ID: 64328
           Summary: addr_equal-1.c fails execution.
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: belagod at gcc dot gnu.org

FAIL: gcc.dg/addr_equal-1.c execution test

$ aarch64-none-elf-gcc 
/work/dev/arm/src/gcc/gcc/testsuite/gcc.dg/addr_equal-1.c -O2 -lm -mcmodel=tiny
-fPIC -o foo.exe

fails on AArch64. This test was introduced by this patch:

https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00613.html

The specific test that's failing is

  if (!__builtin_constant_p (&def_var0 == &def_var1))
    abort();

where def_var0 and def_var1 are globals declared in the same translation unit.
When compiled with fPIC, how much can we know about their addresses at
compile-time for the above test to pass? Is this test valid?


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