Bug 42755 - Using _Complex_I on Open Solaris fails to build an executable
Summary: Using _Complex_I on Open Solaris fails to build an executable
Status: RESOLVED DUPLICATE of bug 42753
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.3.4
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-15 10:25 UTC by Dr. David Kirkby
Modified: 2010-01-15 11:51 UTC (History)
2 users (show)

See Also:
Host: SunOS hawk 5.11 snv_111b i86pc i386 i86pc
Target: SunOS hawk 5.11 snv_111b i86pc i386 i86pc
Build: SunOS hawk 5.11 snv_111b i86pc i386 i86pc
Known to work:
Known to fail:
Last reconfirmed:


Attachments
simple_complex.c (301 bytes, text/plain)
2010-01-15 10:30 UTC, Dr. David Kirkby
Details
Preprocessed header (1.52 KB, text/plain)
2010-01-15 10:31 UTC, Dr. David Kirkby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. David Kirkby 2010-01-15 10:25:24 UTC
I reported this bug against a SPARC system at #42753, but as this is a different version of gcc, on a different operating system with a different processor, I thought it wise to create another ticket. 

The hardware is a Sun Ultra 27, with a 3.33 GHz Xeon processor.

The attached code builds and runs as expected using the Sun Studio 12.1 compiler. 

drkirkby@hawk:~$ /opt/sunstudio12.1/bin/cc -V simple_complex.c
cc: Sun C 5.10 SunOS_i386 2009/06/03
acomp: Sun C 5.10 SunOS_i386 2009/06/03
ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1652

drkirkby@hawk:~$ ./a.out
CYTHON_CCOMPLEX 1

However, it fails with gcc 4.3.4

drkirkby@hawk:~$  /usr/local/gcc-4.3.4-GNU-assembler-Sun-linker/bin/gcc -std=c99  -v -save-temps simple_complex.c
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc-4.3.4/configure --prefix=/usr/local/gcc-4.3.4-GNU-assembler-Sun-linker --with-as=/usr/local/binutils-2.20/bin/as --with-ld=/usr/ccs/bin/ld --with-gmp=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 4.3.4 (GCC) 
COLLECT_GCC_OPTIONS='-std=c99' '-v' '-save-temps' '-mtune=generic'
 /usr/local/gcc-4.3.4-GNU-assembler-Sun-linker/libexec/gcc/i386-pc-solaris2.11/4.3.4/cc1 -E -quiet -v simple_complex.c -mtune=generic -std=c99 -fpch-preprocess -o simple_complex.i
ignoring nonexistent directory "/usr/local/gcc-4.3.4-GNU-assembler-Sun-linker/lib/gcc/i386-pc-solaris2.11/4.3.4/../../../../i386-pc-solaris2.11/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/gcc-4.3.4-GNU-assembler-Sun-linker/include
 /usr/local/gcc-4.3.4-GNU-assembler-Sun-linker/lib/gcc/i386-pc-solaris2.11/4.3.4/include
 /usr/local/gcc-4.3.4-GNU-assembler-Sun-linker/lib/gcc/i386-pc-solaris2.11/4.3.4/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-std=c99' '-v' '-save-temps' '-mtune=generic'
 /usr/local/gcc-4.3.4-GNU-assembler-Sun-linker/libexec/gcc/i386-pc-solaris2.11/4.3.4/cc1 -fpreprocessed simple_complex.i -quiet -dumpbase simple_complex.c -mtune=generic -auxbase simple_complex -std=c99 -version -o simple_complex.s
GNU C (GCC) version 4.3.4 (i386-pc-solaris2.11)
	compiled by GNU C version 4.3.4, GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: aa8ffffda34c6527631409af75a63ef2
simple_complex.c: In function ‘__pyx_t_double_complex_from_parts’:
simple_complex.c:20: error: ‘_Complex_I’ undeclared (first use in this function)
simple_complex.c:20: error: (Each undeclared identifier is reported only once
simple_complex.c:20: error: for each function it appears in.)
Comment 1 Dr. David Kirkby 2010-01-15 10:30:04 UTC
Created attachment 19608 [details]
simple_complex.c

C source code
Comment 2 Dr. David Kirkby 2010-01-15 10:31:33 UTC
Created attachment 19609 [details]
Preprocessed header
Comment 3 Joseph S. Myers 2010-01-15 11:51:10 UTC

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