public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/43834]  New: problems when linking in XCode 3.2.2 (gcc build 5659) - static constants are messed?
@ 2010-04-21 14:17 alexander dot v dot kobotov at intel dot com
  2010-04-21 14:19 ` [Bug other/43834] " alexander dot v dot kobotov at intel dot com
  2010-04-21 14:37 ` rguenth at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: alexander dot v dot kobotov at intel dot com @ 2010-04-21 14:17 UTC (permalink / raw)
  To: gcc-bugs

Hi,

I'm experiencing problems when statically linking using particular GCC supplied
with XCode 3.2.2: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build
5659) on Mac OS X 10.6.2. Computations become incorrect.

My application consists of main in C and computational code in Fortran (NETLIB
BLAS and slightly modified LAPACK). I'm compiling Fortran code using Intel
Fortran Compiler.

If I'm linking using the particular build, then results of my computations
become completely incorrect. When I'm linking using any other build (5646 from
XCode 3.2, or even i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build
5490)) everything computes correctly for the exactly same object files.

I'm guessing that linker somehow messes constants in my code and this results
incorrect computations. I've succeed to see in my big application that constant
ONE becomes -ONE with only this linker, however cleaning up for a smaller
reproducer I've missed such a constant, but computations results in the
reproducer are still incorrect for the build.

I've tried different versions of Intel Fortran Compiler (10.1, 11.1, etc), also
tried to compile C code with GCC and with Intel C Compiler - all this doesn't
affect results. Only GCC build matters, so I assume this is a problem of
linker. However map files produced by all mentioned builds of GCC are binary
same, so the problem somewhere deeper.

I'm attaching object files of reproducer. To link say just: gcc *.o. 
Resulting a.out will show correct output like:
x[0] = {1.000000, 0.000000}
x[1] = {1.000000, 0.000000}
x[2] = {1.000000, 0.000000}
TEST PASSED

or report a error like:
info = 0
x[0] = {0.856000, -0.608000} - FAIL
x[1] = {1.520000, 0.840000} - FAIL
x[2] = {0.968000, 1.176000} - FAIL
TEST FAILED!!!


Please feel free to ask for more details. I would like to help to localize the
issue, but just don't know where to look at.

Thanks,
Alexander


-- 
           Summary: problems when linking in XCode 3.2.2 (gcc build 5659) -
                    static constants are messed?
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: alexander dot v dot kobotov at intel dot com


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


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

* [Bug other/43834] problems when linking in XCode 3.2.2 (gcc build 5659) - static constants are messed?
  2010-04-21 14:17 [Bug other/43834] New: problems when linking in XCode 3.2.2 (gcc build 5659) - static constants are messed? alexander dot v dot kobotov at intel dot com
@ 2010-04-21 14:19 ` alexander dot v dot kobotov at intel dot com
  2010-04-21 14:37 ` rguenth at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: alexander dot v dot kobotov at intel dot com @ 2010-04-21 14:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from alexander dot v dot kobotov at intel dot com  2010-04-21 14:18 -------
Created an attachment (id=20452)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20452&action=view)
Object files and good output and bad output.

File linked correctly is in a.out.good
File with erroneous output in a.out.bad
Also object files used to link are attached.


-- 


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


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

* [Bug other/43834] problems when linking in XCode 3.2.2 (gcc build 5659) - static constants are messed?
  2010-04-21 14:17 [Bug other/43834] New: problems when linking in XCode 3.2.2 (gcc build 5659) - static constants are messed? alexander dot v dot kobotov at intel dot com
  2010-04-21 14:19 ` [Bug other/43834] " alexander dot v dot kobotov at intel dot com
@ 2010-04-21 14:37 ` rguenth at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-21 14:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-04-21 14:37 -------
Report it to Apple.  The version Apple ships does not resemble anything like
an FSF release that would still be supported.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2010-04-21 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-21 14:17 [Bug other/43834] New: problems when linking in XCode 3.2.2 (gcc build 5659) - static constants are messed? alexander dot v dot kobotov at intel dot com
2010-04-21 14:19 ` [Bug other/43834] " alexander dot v dot kobotov at intel dot com
2010-04-21 14:37 ` 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).