[Bug testsuite/101321] gcc.dg/debug/btf/btf-bitfields-3.c fail on arm-eabi

2021-07-07 Thread clyon at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101321

--- Comment #7 from Christophe Lyon  ---

> PS: I let -fno-short-enums remain in the testcase for now. If the patch
> fixes the issue while removing -fno-short-enums, the testcase can be updated
> to not have -fno-short-enums anymore.

I just checked, and committed the removal of -fno-short-enums as it is not
necessary anymore.
Thanks

[Bug testsuite/101321] gcc.dg/debug/btf/btf-bitfields-3.c fail on arm-eabi

2021-07-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101321

--- Comment #6 from CVS Commits  ---
The master branch has been updated by Christophe Lyon :

https://gcc.gnu.org/g:e8073c04536214c856a6340fea23d676cd7436af

commit r12-2099-ge8073c04536214c856a6340fea23d676cd7436af
Author: Christophe Lyon 
Date:   Wed Jul 7 12:42:34 2021 +

testsuite: gcc.dg/debug/btf/btf-bitfields-3.c remove -fno-short-enums PR
debug/101321

After r12-2094, -fno-short-enums is non longer necessary.

2021-07-07  Christophe Lyon  

PR debug/101321
gcc/testsuite/
* gcc.dg/debug/btf/btf-bitfields-3.c: Remove -fno-short-enums.

[Bug testsuite/101321] gcc.dg/debug/btf/btf-bitfields-3.c fail on arm-eabi

2021-07-06 Thread ibhagatgnu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101321

Indu Bhagat  changed:

   What|Removed |Added

 CC||ibhagatgnu at gmail dot com

--- Comment #5 from Indu Bhagat  ---
The issue here is in the testcase. It is relying on the order of the generated
CTF types.

Adding -fno-short-enums might have masked the issue, ideally the testcase
should be fixed by removing such a non-portable check.

I noticed similar issues on Darwin for PR debug/101283
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101283

I think the following commit should have fixed this issue on arm-eabi as well.

The master branch has been updated by Indu Bhagat :

https://gcc.gnu.org/g:d9e9532bb3bf5db4cd6afd49d343ede5b27c3c9f

commit r12-2094-gd9e9532bb3bf5db4cd6afd49d343ede5b27c3c9f
Author: Indu Bhagat 
Date:   Tue Jul 6 16:11:47 2021 -0700

BTF testsuite: Remove explicit check on btm_type

The value of btm_type is the BTF type ID of the referred type.  The order in   
which the BTF types are added can change across platforms and also as the code
evolves, hence changing the BTF type ID. As there is no direct and portable
method of testing that a BTF type refers to another BTF type of a specific
kind, remove the explicit check on btm_type.

This patch adjusts the testcase without affecting the test coverage as other   
 testcases already have similar constructs. It also fixes a subset of failures 
 as seen on Darwin.

2021-07-06  Indu Bhagat  

gcc/testsuite/ChangeLog:

  PR debug/101283
  * gcc.dg/debug/btf/btf-bitfields-3.c: Remove the check on btm_type.

PS: I let -fno-short-enums remain in the testcase for now. If the patch fixes
the issue while removing -fno-short-enums, the testcase can be updated to not
have -fno-short-enums anymore.

[Bug testsuite/101321] gcc.dg/debug/btf/btf-bitfields-3.c fail on arm-eabi

2021-07-05 Thread clyon at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101321

Christophe Lyon  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Christophe Lyon  ---
Fixed

[Bug testsuite/101321] gcc.dg/debug/btf/btf-bitfields-3.c fail on arm-eabi

2021-07-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101321

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Christophe Lyon :

https://gcc.gnu.org/g:0ea47850bbb38ea81a34c503533d4dd0f3391f19

commit r12-2005-g0ea47850bbb38ea81a34c503533d4dd0f3391f19
Author: Christophe Lyon 
Date:   Mon Jul 5 11:33:45 2021 +

testsuite: gcc.dg/debug/btf/btf-bitfields-3.c requires -fno-short-enums PR
debug/101321

arm-eabi uses -fshort-enums by default while arm-linux-gnueabi* do not,
like most (all?) other targets, but this test relies -fno-short-enums.
Fix it by forcing -fno-short-enums.

2021-07-05  Christophe Lyon  

PR debug/101321
gcc/testsuite/
* gcc.dg/debug/btf/btf-bitfields-3.c: Add -fno-short-enums.

[Bug testsuite/101321] gcc.dg/debug/btf/btf-bitfields-3.c fail on arm-eabi

2021-07-05 Thread clyon at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101321

--- Comment #2 from Christophe Lyon  ---
OK, makes sense, thanks!

[Bug testsuite/101321] gcc.dg/debug/btf/btf-bitfields-3.c fail on arm-eabi

2021-07-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101321

Andrew Pinski  changed:

   What|Removed |Added

  Component|debug   |testsuite

--- Comment #1 from Andrew Pinski  ---
>The new test gcc.dg/debug/btf/btf-bitfields-3.c fails on arm-eabi, but works 
>on arm-linux-gnueabi:


So on arm-eabi -fshort-enum is default while on arm-linux-gnueabi it is not.

So the testcase needs to have -fno-short-enum added to it.