public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/41638]  New: Back-end builtins are mishandled
@ 2009-10-08 23:45 pinskia at gcc dot gnu dot org
  2009-10-08 23:49 ` [Bug lto/41638] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-08 23:45 UTC (permalink / raw)
  To: gcc-bugs

lto_get_builtin_tree uses built_in_decls but that is only for the
built_in_class of BUILT_IN_NORMAL.  The back-ends have their own array with the
builtins in them for the class of BUILT_IN_MD.
So currently we translate all of the back-end builtins into "normal" builtins.

This is why gcc.dg/vmx/3a-03.c currently fails;  Most likely all of the vmx
testsuite in fact.
In that example __builtin_altivec_vrefp is changed when reading back the file
into __builtin_lgammal.


-- 
           Summary: Back-end builtins are mishandled
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code, ice-on-valid-code, link-failure
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


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

* [Bug lto/41638] Back-end builtins are mishandled
  2009-10-08 23:45 [Bug lto/41638] New: Back-end builtins are mishandled pinskia at gcc dot gnu dot org
@ 2009-10-08 23:49 ` pinskia at gcc dot gnu dot org
  2009-10-09  9:43 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-08 23:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-10-08 23:48 -------
Note the back-end builtin arrays don't have the same name so it is not as
simple as using that array.  I think we need to add either a target hook or
have a standard name for them.

Also the assert there for END_BUILTINS is also incorrect for BUILT_IN_MD as
there could be more target builtins than there are normal builtins.

Which means the use of enum built_in_function is incorrect for  function_code
and could break when we compile with the C++ front-end.


-- 


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


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

* [Bug lto/41638] Back-end builtins are mishandled
  2009-10-08 23:45 [Bug lto/41638] New: Back-end builtins are mishandled pinskia at gcc dot gnu dot org
  2009-10-08 23:49 ` [Bug lto/41638] " pinskia at gcc dot gnu dot org
@ 2009-10-09  9:43 ` rguenth at gcc dot gnu dot org
  2009-10-09 22:32 ` rguenth at gcc dot gnu dot org
  2009-10-09 22:34 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-09  9:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-10-09 09:43 -------
Yeah, I also noticed the inconvenience of not having a standard way to access
the array with target builtins.  I'll have a look.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-10-09 09:43:25
               date|                            |


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


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

* [Bug lto/41638] Back-end builtins are mishandled
  2009-10-08 23:45 [Bug lto/41638] New: Back-end builtins are mishandled pinskia at gcc dot gnu dot org
  2009-10-08 23:49 ` [Bug lto/41638] " pinskia at gcc dot gnu dot org
  2009-10-09  9:43 ` rguenth at gcc dot gnu dot org
@ 2009-10-09 22:32 ` rguenth at gcc dot gnu dot org
  2009-10-09 22:34 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-09 22:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-10-09 22:32 -------
Subject: Bug 41638

Author: rguenth
Date: Fri Oct  9 22:31:53 2009
New Revision: 152606

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152606
Log:
2009-10-09  Richard Guenther  <rguenther@suse.de>

        PR lto/41638
        * target-def.h (TARGET_BUILTIN_DECL): Define.
        (TARGET_INITIALIZER): Add TARGET_BUILTIN_DECL.
        * target.h (struct gcc_target): Add builtin_decl target hook.
        * doc/tm.texi (TARGET_BUILTIN_DECL): Document.

        * lto-streamer-in.c (lto_get_builtin_tree): Fix handling of
        target builtins.
        * lto-streamer-out.c (lto_output_tree_pointers): Use sorry,
        not gcc_unreachable.
        (lto_output_builtin_tree): Sorry if the target does not support
        streaming target builtins.

        * config/rs6000/rs6000.c (TARGET_BUILTIN_DECL): Define.
        (rs6000_builtin_decl): New function.
        * config/i386/i386.c (TARGET_BUILTIN_DECL): Define.
        (ix86_builtin_decl): New function.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/doc/tm.texi
    trunk/gcc/lto-streamer-in.c
    trunk/gcc/lto-streamer-out.c
    trunk/gcc/target-def.h
    trunk/gcc/target.h


-- 


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


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

* [Bug lto/41638] Back-end builtins are mishandled
  2009-10-08 23:45 [Bug lto/41638] New: Back-end builtins are mishandled pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-10-09 22:32 ` rguenth at gcc dot gnu dot org
@ 2009-10-09 22:34 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-09 22:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-10-09 22:33 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-10-09 22:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-08 23:45 [Bug lto/41638] New: Back-end builtins are mishandled pinskia at gcc dot gnu dot org
2009-10-08 23:49 ` [Bug lto/41638] " pinskia at gcc dot gnu dot org
2009-10-09  9:43 ` rguenth at gcc dot gnu dot org
2009-10-09 22:32 ` rguenth at gcc dot gnu dot org
2009-10-09 22:34 ` rguenth at gcc dot 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).