public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/94993] New: aarch64 <arm_acle.h> incompatible with -mgeneral-regs-only
@ 2020-05-08  6:27 roland at gnu dot org
  2020-11-25 15:03 ` [Bug target/94993] " rearnsha at gcc dot gnu.org
  2021-11-30  3:16 ` roland at gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: roland at gnu dot org @ 2020-05-08  6:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94993
           Summary: aarch64 <arm_acle.h> incompatible with
                    -mgeneral-regs-only
           Product: gcc
           Version: 10.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roland at gnu dot org
  Target Milestone: ---

This is a regression from 9.3.1.  Using --target=aarch64-elf built from git
commit 6fedf28c7921f125be75a9f688a7b845a1b5663b.

aarch64-elf-g++ -mgeneral-regs-only -S -o /dev/null -xc++ <(echo '#include
<arm_acle.h>')
fails with various unrecognized builtins.

The target attribute/pragma doesn't accept "no-general-regs-only", so I'm not
sure how to fix it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/94993] aarch64 <arm_acle.h> incompatible with -mgeneral-regs-only
  2020-05-08  6:27 [Bug target/94993] New: aarch64 <arm_acle.h> incompatible with -mgeneral-regs-only roland at gnu dot org
@ 2020-11-25 15:03 ` rearnsha at gcc dot gnu.org
  2021-11-30  3:16 ` roland at gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2020-11-25 15:03 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-11-25
     Ever confirmed|0                           |1

--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Confirmed, but only happens for C++, I can't reproduce it with the C compiler.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/94993] aarch64 <arm_acle.h> incompatible with -mgeneral-regs-only
  2020-05-08  6:27 [Bug target/94993] New: aarch64 <arm_acle.h> incompatible with -mgeneral-regs-only roland at gnu dot org
  2020-11-25 15:03 ` [Bug target/94993] " rearnsha at gcc dot gnu.org
@ 2021-11-30  3:16 ` roland at gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: roland at gnu dot org @ 2021-11-30  3:16 UTC (permalink / raw)
  To: gcc-bugs

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

roland at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rearnsha at gcc dot gnu.org

--- Comment #2 from roland at gnu dot org ---
I'm still seeing this in current 11 branch.  I had been using a workaround
kludge that sufficed on the 10 branch but no longer does the trick in 11.  What
I did to work around it is dropped `-mgeneral-regs-only` and instead used a
`-include` file to inject:
```
#pragma GCC push_options                                                        
#pragma GCC target ("general-regs-only")
```
at the top of each translation unit.  Then, I use:
```
#pragma GCC pop_options
#include <arm_acle.h>
#pragma GCC push_options                                                        
#pragma GCC target ("general-regs-only")
```

This worked OK in 10.  However, now in 11 I see a few functions that still use
vector registers.  One example I noted was the implicitly-defined function for
running some static constructors, which might be outside any "parsing state"
where the `#pragma GCC target` state would apply.  The other example I found
was in a lambda function, which ISTM should have been affected by the pragma.

Rather than debug the workaround, I'd prefer to get the real bug fixed.  Is
there any hope of this?  Given that C handles it OK, it seems like it shouldn't
be too hard to make C++ use matching logic, but that may be wishful thinking.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-30  3:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  6:27 [Bug target/94993] New: aarch64 <arm_acle.h> incompatible with -mgeneral-regs-only roland at gnu dot org
2020-11-25 15:03 ` [Bug target/94993] " rearnsha at gcc dot gnu.org
2021-11-30  3:16 ` roland at gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).