public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47947] New: Varibles of type vector double are not copied correctly in gcc-4.5.1 and gcc-4.6.0
@ 2011-03-01 17:25 tkarkha at us dot ibm.com
  2011-03-01 20:10 ` [Bug c/47947] " dje at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: tkarkha at us dot ibm.com @ 2011-03-01 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Varibles of type vector double are not copied
                    correctly in gcc-4.5.1 and gcc-4.6.0
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tkarkha@us.ibm.com
                CC: meissner@linux.vnet.ibm.com


Created attachment 23505
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23505
Tarfile for recreating the bug

When copying one vector double variable to another vector double variable, for
some variables the lower half of the variable is zeroed out.  The zeroing
results in incorrect computations.  This happens for all -O optimization
levels.

A small testcase is provided to recreate the bug.  In the testcase a simple
vector addition with vec_add() results in an incorrect result due to incorrect
copy.  Here is the ouptut from the testcase:
$ ./gccBugTest_GCC               
DEBUG:: u_in0 = <1.000000,2.000000,3.000000,4.000000>
DEBUG:: u_in1 = <5.000000,6.000000,7.000000,8.000000>
DEBUG::foo:: l_temp0 = <1.000000,2.000000,3.000000,4.000000>
DEBUG::foo:: l_temp1 = <5.000000,6.000000,7.000000,8.000000>
DEBUG::foo:: in0 HI = <1.000000,0.000000>
DEBUG::foo:: in0 LO = <3.000000,0.000000>
DEBUG::foo:: in1 HI = <5.000000,0.000000>
DEBUG::foo:: in1 LO = <7.000000,0.000000>
DEBUG::foo:: l_result HI = <6.000000,0.000000>
DEBUG::foo:: l_result LO = <10.000000,12.000000>
DEBUG::foo:: result:: l_temp2 = <6.000000,0.000000,10.000000,12.000000>
DEBUG:: u_out = <6.000000,0.000000,10.000000,12.000000>
$ 

The last DEBUG line should be DEBUG:: u_out =
<6.000000,8.000000,10.000000,12.000000>
          ^^^^^^^^


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

end of thread, other threads:[~2011-07-25 14:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-01 17:25 [Bug c/47947] New: Varibles of type vector double are not copied correctly in gcc-4.5.1 and gcc-4.6.0 tkarkha at us dot ibm.com
2011-03-01 20:10 ` [Bug c/47947] " dje at gcc dot gnu.org
2011-03-01 21:51 ` [Bug target/47947] " pthaugen at gcc dot gnu.org
2011-03-02 10:25 ` rguenth at gcc dot gnu.org
2011-03-02 22:09 ` dje at gcc dot gnu.org
2011-03-02 22:30 ` dje at gcc dot gnu.org
2011-03-02 22:35 ` tkarkha at us dot ibm.com
2011-03-02 22:48 ` dje at gcc dot gnu.org
2011-03-02 22:51 ` dje at gcc dot gnu.org
2011-03-02 23:02 ` pthaugen at gcc dot gnu.org
2011-03-02 23:03 ` pthaugen at gcc dot gnu.org
2011-03-02 23:14 ` pthaugen at gcc dot gnu.org
2011-03-03  1:48 ` [Bug target/47947] Variables " dje at gcc dot gnu.org
2011-03-03 22:12 ` pthaugen at gcc dot gnu.org
2011-03-07 20:10 ` pthaugen at gcc dot gnu.org
2011-07-25 14:27 ` dje 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).