public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/59884] New: Unexpected warning pragma GCC target
@ 2014-01-20  3:07 joey.ye at arm dot com
  2014-01-20  3:46 ` [Bug target/59884] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: joey.ye at arm dot com @ 2014-01-20  3:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59884

            Bug ID: 59884
           Summary: Unexpected warning pragma GCC target
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joey.ye at arm dot com

Affected target: arm. (x86/x86_64 passes)
Affected version: trunk 20140109, 4.8, 4.7

~/cases/pragma $ cat p.c
#pragma GCC push_options
#pragma GCC optimize("O2")
int foo(int a){
return a+1;
}
#pragma GCC pop_options

~/cases/pragma $ arm-none-eabi-gcc p.c -c
p.c:6:9: warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
 #pragma GCC pop_options


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

* [Bug target/59884] Unexpected warning pragma GCC target
  2014-01-20  3:07 [Bug c/59884] New: Unexpected warning pragma GCC target joey.ye at arm dot com
@ 2014-01-20  3:46 ` pinskia at gcc dot gnu.org
  2014-01-20  3:56 ` joey.ye at arm dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-01-20  3:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59884

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |target

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Comes from:
  if (p->target_binary != target_option_current_node)
    {
      (void) targetm.target_option.pragma_parse (NULL_TREE, p->target_binary);
      target_option_current_node = p->target_binary;
    }


The front-end expects the target always to implement these target hooks it
seems rather than the default.

Really I think the arm back-end should implement them so that thumb2 code can
be in the same source file as arm32 code and would help out LTO when people mix
and match them.


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

* [Bug target/59884] Unexpected warning pragma GCC target
  2014-01-20  3:07 [Bug c/59884] New: Unexpected warning pragma GCC target joey.ye at arm dot com
  2014-01-20  3:46 ` [Bug target/59884] " pinskia at gcc dot gnu.org
@ 2014-01-20  3:56 ` joey.ye at arm dot com
  2015-04-30  9:59 ` ramana at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: joey.ye at arm dot com @ 2014-01-20  3:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59884

--- Comment #2 from Joey Ye <joey.ye at arm dot com> ---
(In reply to Andrew Pinski from comment #1)
> Comes from:
>   if (p->target_binary != target_option_current_node)
>     {
>       (void) targetm.target_option.pragma_parse (NULL_TREE,
> p->target_binary);
>       target_option_current_node = p->target_binary;
>     }
> 
> 
> The front-end expects the target always to implement these target hooks it
> seems rather than the default.
> 
> Really I think the arm back-end should implement them so that thumb2 code
> can be in the same source file as arm32 code and would help out LTO when
> people mix and match them.
It is a useful feature on ARM. I don't know why it isn't support now.

But this warning still need to be fixed as there are always some targets not
supportting this pragma.


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

* [Bug target/59884] Unexpected warning pragma GCC target
  2014-01-20  3:07 [Bug c/59884] New: Unexpected warning pragma GCC target joey.ye at arm dot com
  2014-01-20  3:46 ` [Bug target/59884] " pinskia at gcc dot gnu.org
  2014-01-20  3:56 ` joey.ye at arm dot com
@ 2015-04-30  9:59 ` ramana at gcc dot gnu.org
  2015-05-20 12:59 ` chrbr at gcc dot gnu.org
  2015-06-22  8:22 ` chrbr at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-04-30  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |arm
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-04-30
                 CC|                            |ramana at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01977.html are the seeds of
fixing this. A lot more will be needed than this basic set of patches to
support more of this. Christian Bruel is looking into this.


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

* [Bug target/59884] Unexpected warning pragma GCC target
  2014-01-20  3:07 [Bug c/59884] New: Unexpected warning pragma GCC target joey.ye at arm dot com
                   ` (2 preceding siblings ...)
  2015-04-30  9:59 ` ramana at gcc dot gnu.org
@ 2015-05-20 12:59 ` chrbr at gcc dot gnu.org
  2015-06-22  8:22 ` chrbr at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-05-20 12:59 UTC (permalink / raw)
  To: gcc-bugs

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

chrbr at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |chrbr at gcc dot gnu.org
         Depends on|                            |52144
         Resolution|---                         |DUPLICATE

--- Comment #4 from chrbr at gcc dot gnu.org ---
#pragma GCC target relies on the target_attribute work

*** This bug has been marked as a duplicate of bug 52144 ***


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52144
[Bug 52144] ARM should support arm/thumb function attribute to permit different
instruction sets in the same source


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

* [Bug target/59884] Unexpected warning pragma GCC target
  2014-01-20  3:07 [Bug c/59884] New: Unexpected warning pragma GCC target joey.ye at arm dot com
                   ` (3 preceding siblings ...)
  2015-05-20 12:59 ` chrbr at gcc dot gnu.org
@ 2015-06-22  8:22 ` chrbr at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-06-22  8:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59884
Bug 59884 depends on bug 52144, which changed state.

Bug 52144 Summary: ARM should support arm/thumb function attribute to permit different instruction sets in the same source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52144

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED


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

end of thread, other threads:[~2015-06-22  8:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20  3:07 [Bug c/59884] New: Unexpected warning pragma GCC target joey.ye at arm dot com
2014-01-20  3:46 ` [Bug target/59884] " pinskia at gcc dot gnu.org
2014-01-20  3:56 ` joey.ye at arm dot com
2015-04-30  9:59 ` ramana at gcc dot gnu.org
2015-05-20 12:59 ` chrbr at gcc dot gnu.org
2015-06-22  8:22 ` chrbr at gcc dot gnu.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).