pointer-compare-1.c: Add __attribute__((used))
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 11 Nov 2020 23:54:00 +0000 (15:54 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 16 Nov 2020 12:10:50 +0000 (04:10 -0800)
commit9dbf8dc7a96a8020e0ee05926ef7a3f976e9c318
tree5f0354453a43934cd77f1b2d54f906e1c663c6b6
parentb2099e9fd94bb73e9fc7cb8f6dc5b2b53b5c5ff3
pointer-compare-1.c: Add __attribute__((used))

c-c++-common/asan/pointer-compare-1.c assumes the certain order for
variable placement.  Add __attribute__((used)) to avoid variable
placement changes due to SHF_GNU_RETAIN.

PR testsuite/97803
* c-c++-common/asan/pointer-compare-1.c (global1): Add
__attribute__((used))
(global2): Likewise.
(small_global): Likewise.
(large_global): Likewise.
gcc/testsuite/c-c++-common/asan/pointer-compare-1.c