the Fink project is an effort to port
popular Unix programs to Mac OS X
Info2: <<
Package: gcc45
Version: 4.5.3
Revision: 1001
Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
Source-MD5: 8e0b5c12212e185f3e4383106bfa9cc6
Source2: ftp://sourceware.org/pub/java/ecj-4.5.jar
Source2-MD5: d7cd6a27c8801e66cbaa964a039ecfdb
PatchFile: %n.patch
PatchFile-MD5: af45e02f10f1ada5521ea23af11e1c1a
Distribution: 10.5, 10.6
Type: -64bit -64bit
Architecture: powerpc, i386
NoSetCPPFLAGS: True
NoSetLDFLAGS: True
UseMaxBuildJobs: True
Conflicts: gcc42, gcc43, gcc44, gcc46, gcc47
Replaces: gcc42, gcc43, gcc44, gcc46, gcc47
Depends: %N-compiler (= %v-%r)
BuildDepends: gmp5, libmpfr4, libiconv-dev, gettext-tools, libgettext8-dev, ppl9, cloog (>= 0.15.11), libmpc2 (>= 0.9), xcode (>= 3.1.2), fink (>= 0.28)
ConfigureParams: <<
--prefix=%p/lib/gcc4.5 --mandir=%p/share/man --infodir=%p/lib/gcc4.5/info --enable-languages=c,c++,fortran,objc,obj-c++,java \
--with-gmp=%p --with-libiconv-prefix=%p --with-ppl=%p --with-cloog=%p --with-mpc=%p --with-system-zlib \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.5
<<
InfoTest: <<
TestDepends: autogen, dejagnu
TestScript: cd ../darwin_objdir; make -k check || :
<<
InfoDocs: cp-tools.info gcc.info gfortran.info cpp.info gccinstall.info libgomp.info cppinternals.info gccint.info gcj.info
CompileScript: <<
#!/bin/bash -ev
set +x
if [ -e /usr/local/lib/libgmp.a ] || [ -e /usr/local/lib/libgmp.dylib ]; then
echo "-----WARNING-----WARNING-----WARNING-----"
echo "You seem to have GMP installed in /usr/local."
echo "This is known to cause %N to fail to build."
echo "Please move aside /usr/local and try again."
echo "-----WARNING-----WARNING-----WARNING-----"
exit 1
fi
set -x
ulimit -s `ulimit -s`
mv ../ecj-4.5.jar ecj.jar
mkdir ../darwin_objdir
cd ../darwin_objdir
if [ "%m" = "powerpc" ]; then
../gcc-%v/configure %c --disable-libjava-multilib
else
../gcc-%v/configure %c
fi
make
## make check requires autogen, dejagnu and expect, and should be run, in darwin_objdir, after install.
## on 32-bit processors use
# make -k check
## on 64-bit processors use
# make -k check RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'"
<<
InstallScript: <<
#!/bin/sh -ev
darwinvers=`uname -r`
cd ../darwin_objdir
make -j1 install DESTDIR=%d
mkdir -p %i/bin
# Add symlinks to recreate previous naming of executables in %p/bin
# as well as %p/lib/gcc4.5/bin and new -fsf-4.5 naming in %p/bin.
binfiles="gcc g++ c++ cpp gcov"
for binfile in $binfiles ; do
ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/lib/gcc4.5/bin/$binfile-4
ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/bin/$binfile-4
ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/bin/$binfile-fsf-4.5
done
binfiles="gfortran gcj gcj-dbtool gcjh gij gjnih grmiregistry grmic jcf-dump jv-convert jv-scan"
for binfile in $binfiles ; do
ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/lib/gcc4.5/bin/$binfile
ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/bin/$binfile
ln -s %p/lib/gcc4.5/bin/$binfile-fsf-4.5 %i/bin/$binfile-fsf-4.5
done
# Add symlinks for manpages under old names.
man1files="cpp g++ gcc gcov"
for man1file in $man1files ; do
ln -s %p/share/man/man1/$man1file-fsf-4.5.2 %i/share/man/man1/$man1file-4.1
done
man1files="aot-compile gappletviewer gc-analyze gcj-dbtool gcj gcjh gfortran gij gjar gjarsigner gjavah gjdoc gkeytool gnative2ascii gorbd grmic grmid grmiregistry gserialver gtnameserv jcf-dump jv-convert rebuild-gcj-db"
for man1file in $man1files ; do
ln -s %p/share/man/man1/$man1file-fsf-4.5.2 %i/share/man/man1/$man1file.1
done
# Rename manpages with -fsf-4.5 suffix and create symlinks to old names.
man7files="fsf-funding gfdl gpl"
for man7file in $man7files ; do
mv %i/share/man/man7/$man7file.7 %i/share/man/man7/$man7file-fsf-4.5.7
ln -s %p/share/man/man7/$man7file-fsf-4.5.7 %i/share/man/man7/$man7file.7
done
# Add dir for installed info files, and link them to %i/share/info.
# the %i/lib/gcc4.5/info/* files will go into the -compiler package
# and the files in %i/share/info go into the main package, this allows
# the info files for specific compiler versions to be accessed with
# e.g. `info -d /fink_install_dir/lib/gcc4.5/info gcc', but the "main" info files will
# be available for the install gcc4N package in %p/share/info, as usual
install -d -m 755 %i/share/info
for infofile in $(find %i/lib/gcc4.5/info -name '*.info*'); do
infobase=$(basename $infofile)
case $infofile in
*info) /usr/bin/install-info --infodir=%i/lib/gcc4.5/info ${infofile} ;;
esac
ln -s %p/lib/gcc4.5/info/$infobase %i/share/info/$infobase
done
if [ "%m" != "powerpc" ] ; then
cp %b/gcc/config/darwin-sections.def %i/lib/gcc4.5/lib/gcc/%m-apple-darwin${darwinvers}/%v/plugin/include/config
fi
# remove build path from .la files
perl -pi -e "s, \-L[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc4.5/lib -name '*.la'`
<<
SplitOff: <<
Package: %N-shlibs
Replaces: gcc4 (<= 20050130-4), gfortran-shlibs
Provides: gfortran-shlibs
Description: Shared libraries for gcc4
DocFiles: gcc/COPYING gcc/COPYING.LIB
Homepage: http://gcc.gnu.org/
Files: <<
lib/gcc4.5/lib/libgfortran.3*.dylib
lib/gcc4.5/lib/libffi.4*.dylib
lib/gcc4.5/lib/libstdc++.6*.dylib
lib/gcc4.5/lib/libgcc_s.1*.dylib
lib/gcc4.5/lib/libgcc_ext.1*.dylib
lib/gcc4.5/lib/libgcj.11*.dylib
lib/gcc4.5/lib/libgcj-tools.11*.dylib
lib/gcc4.5/lib/libgij.11*.dylib
lib/gcc4.5/lib/libssp.0*.dylib
lib/gcc4.5/lib/libobjc-gnu.2*.dylib
lib/gcc4.5/lib/libgomp.1*.dylib
lib/gcc4.5/lib/gcj-4.5.3-11
lib/gcc4.5/%lib/libgfortran.3*.dylib
lib/gcc4.5/%lib/libffi.4*.dylib
(%m != powerpc) lib/gcc4.5/%lib/libgcj.11*.dylib
(%m != powerpc) lib/gcc4.5/%lib/libgcj-tools.11*.dylib
(%m != powerpc) lib/gcc4.5/%lib/libgij.11*.dylib
lib/gcc4.5/%lib/libstdc++.6*.dylib
lib/gcc4.5/%lib/libssp.0*.dylib
lib/gcc4.5/%lib/libobjc-gnu.2*.dylib
lib/gcc4.5/%lib/libgomp.1*.dylib
(%m != powerpc) lib/gcc4.5/%lib/gcj-4.5.3-11
<<
Shlibs: <<
%p/lib/gcc4.5/lib/libgfortran.3.dylib 4.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libffi.4.dylib 5.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libstdc++.6.dylib 7.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libgcc_s.1.dylib 1.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libgcj.11.dylib 12.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libgcj-tools.11.dylib 12.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libgij.11.dylib 12.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libssp.0.dylib 1.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libobjc-gnu.2.dylib 3.0.0 %n (>= 4.5-1)
%p/lib/gcc4.5/lib/libgomp.1.dylib 2.0.0 %n (>= 4.5-1)
!%p/lib/gcc4.5/lib/gcj-4.5.3-11/libjvm.dylib
%p/lib/gcc4.5/%lib/libgfortran.3.dylib 4.0.0 %n (>= 4.5-1) 64
%p/lib/gcc4.5/%lib/libffi.4.dylib 5.0.0 %n (>= 4.5-1) 64
(%m != powerpc) %p/lib/gcc4.5/%lib/libgcj.11.dylib 12.0.0 %n (>= 4.5-1) 64
(%m != powerpc) %p/lib/gcc4.5/%lib/libgcj-tools.11.dylib 12.0.0 %n (>= 4.5-1) 64
(%m != powerpc) %p/lib/gcc4.5/%lib/libgij.11.dylib 12.0.0 %n (>= 4.5-1) 64
%p/lib/gcc4.5/%lib/libstdc++.6.dylib 7.0.0 %n (>= 4.5-1) 64
%p/lib/gcc4.5/%lib/libssp.0.dylib 1.0.0 %n (>= 4.5-1) 64
%p/lib/gcc4.5/%lib/libobjc-gnu.2.dylib 3.0.0 %n (>= 4.5-1) 64
%p/lib/gcc4.5/%lib/libgomp.1.dylib 2.0.0 %n (>= 4.5-1) 64
(%m != powerpc) !%p/lib/gcc4.5/%lib/gcj-4.5.3-11/libjvm.dylib
<<
<<
SplitOff2: <<
Package: %N-compiler
Depends: gmp5-shlibs, libgmpxx5-shlibs, libmpfr4-shlibs, %N-shlibs (= %v-%r), libiconv, libgettext8-shlibs, ppl9-shlibs, cloog-shlibs (>= 0.15.11), libmpc2-shlibs (>= 0.9), xcode (>= 3.1.2)
BuildDependsOnly: False
Description: Compiler Binaries for gcc45.
DocFiles: gcc/COPYING gcc/COPYING.LIB
Homepage: http://gcc.gnu.org/
Files: <<
bin/*-fsf-4.5
lib/gcc4.5
share/man/man1/*-fsf-4.5.1
share/man/man3/*-fsf-4.5.3
share/man/man7/*-fsf-4.5.7
<<
<<
PostInstScript: <<
update-alternatives --install %p/share/man/man3/ffi.3 ffi %p/share/man/man3/%N_ffi.3 60 \
--slave %p/share/man/man3/ffi_call.3 ffi_call %p/share/man/man3/%N_ffi_call.3 \
--slave %p/share/man/man3/ffi_prep_cif.3 ffi_prep_cif %p/share/man/man3/%N_ffi_prep_cif.3
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
update-alternatives --remove ffi %p/share/man/man3/%N_ffi.3
fi
<<
License: GPL
Description: GNU Compiler Collection Version 4.5
DescDetail: <<
GCC, the GNU Compiler Collection, includes front ends for
C, C++, Objective-C, Objective-C++, Fortran, Java, and Ada.
.
C, C++, Objective C and Fortran and Java are included in this package.
.
The C and C++ compilers are named gcc-4 and g++-4 to avoid
conflicts with gcc and g++ installed by the Apple Developer Tools
<<
DescPackaging: <<
The multilib build of libjava is disabled for PowerPC since the
64-bit support is incomplete on Darwin for libffi.
Build with -fsf-4.5 suffix and place non-overlapping files into new gcc45-compiler
package which can co-exist with other gcc4x-compiler packages. Overlapping files
are left in main gcc45 package which still conflicts with other gcc4x packages.
<<
Homepage: http://gcc.gnu.org/
Maintainer: Jack Howarth
<<
diff -uNr gcc-4.5.1/gcc/config/i386/i386.c gcc-4.5.1.patched/gcc/config/i386/i386.c
--- gcc-4.5.1/gcc/config/i386/i386.c 2010-07-22 02:42:02.000000000 -0400
+++ gcc-4.5.1.patched/gcc/config/i386/i386.c 2010-08-10 19:16:23.000000000 -0400
@@ -4991,7 +4991,8 @@
case, we return the original mode and warn ABI change if CUM isn't
NULL. */
-static enum machine_mode
+enum machine_mode type_natural_mode (const_tree, CUMULATIVE_ARGS *);
+enum machine_mode
type_natural_mode (const_tree type, CUMULATIVE_ARGS *cum)
{
enum machine_mode mode = TYPE_MODE (type);
@@ -5122,7 +5123,9 @@
See the x86-64 PS ABI for details.
*/
-static int
+int classify_argument (enum machine_mode, const_tree,
+ enum x86_64_reg_class [MAX_CLASSES], int);
+int
classify_argument (enum machine_mode mode, const_tree type,
enum x86_64_reg_class classes[MAX_CLASSES], int bit_offset)
{
@@ -5503,7 +5506,8 @@
/* Examine the argument and return set number of register required in each
class. Return 0 iff parameter should be passed in memory. */
-static int
+int examine_argument (enum machine_mode, const_tree, int, int *, int *);
+int
examine_argument (enum machine_mode mode, const_tree type, int in_return,
int *int_nregs, int *sse_nregs)
{
@@ -6184,7 +6188,8 @@
/* Return true when TYPE should be 128bit aligned for 32bit argument passing
ABI. */
-static bool
+bool contains_aligned_value_p (const_tree);
+bool
contains_aligned_value_p (const_tree type)
{
enum machine_mode mode = TYPE_MODE (type);
diff -uNr gcc-4.5.1/libjava/configure gcc-4.5.1.patched/libjava/configure
--- gcc-4.5.1/libjava/configure 2010-07-31 05:34:58.000000000 -0400
+++ gcc-4.5.1.patched/libjava/configure 2010-08-10 19:16:23.000000000 -0400
@@ -1610,6 +1610,8 @@
default=yes
--enable-java-maintainer-mode
allow rebuilding of .class and .h files
+ --enable-libjava-multilib
+ build libjava as multilib
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
@@ -3347,6 +3349,16 @@
fi
+# Check whether --enable-libjava-multilib was given.
+if test "${enable_libjava_multilib+set}" = set; then
+ enableval=$enable_libjava_multilib;
+fi
+
+if test "$enable_libjava_multilib" = no; then
+ multilib=no
+ ac_configure_args="$ac_configure_args --disable-multilib"
+fi
+
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
diff -uNr gcc-4.5.1/libjava/configure.ac gcc-4.5.1.patched/libjava/configure.ac
--- gcc-4.5.1/libjava/configure.ac 2010-07-15 08:05:56.000000000 -0400
+++ gcc-4.5.1.patched/libjava/configure.ac 2010-08-10 19:16:23.000000000 -0400
@@ -139,6 +139,13 @@
[allow rebuilding of .class and .h files]))
AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
+AC_ARG_ENABLE(libjava-multilib,
+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
+if test "$enable_libjava_multilib" = no; then
+ multilib=no
+ ac_configure_args="$ac_configure_args --disable-multilib"
+fi
+
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
GCC_NO_EXECUTABLES
--- gcc-4.5.4.orig/libjava/configure 2011-06-18 11:08:52.000000000 -0400
+++ gcc-4.5.4/libjava/configure 2011-06-18 11:10:28.000000000 -0400
@@ -19754,9 +19754,12 @@
SYSTEMSPEC="-lunicows $SYSTEMSPEC"
fi
;;
- *-*-darwin[912]*)
+ *-*-darwin9*)
SYSTEMSPEC="-allow_stack_execute"
;;
+ *-*-darwin[1][1-9]*)
+ SYSTEMSPEC="-no_pie -allow_stack_execute"
+ ;;
*)
SYSTEMSPEC=
;;
--- gcc-4.5.4.orig/libjava/configure.ac 2011-06-18 11:08:57.000000000 -0400
+++ gcc-4.5.4/libjava/configure.ac 2011-06-18 11:11:38.000000000 -0400
@@ -882,9 +882,12 @@
SYSTEMSPEC="-lunicows $SYSTEMSPEC"
fi
;;
- *-*-darwin[[912]]*)
+ *-*-darwin9*)
SYSTEMSPEC="-allow_stack_execute"
;;
+ *-*-darwin[[1]][[1-9]]*)
+ SYSTEMSPEC="-no_pie -allow_stack_execute"
+ ;;
*)
SYSTEMSPEC=
;;
--- gcc-4.5.4.orig/libjava/libgcj.spec.in 2011-06-18 11:13:32.000000000 -0400
+++ gcc-4.5.4/libjava/libgcj.spec.in 2011-06-18 11:13:55.000000000 -0400
@@ -7,6 +7,6 @@
*startfile: @THREADSTARTFILESPEC@ %(startfileorig)
%rename lib liborig
-*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
+*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ @LIBGCJ_BC_SPEC@ -fkeep-inline-functions
--- gcc-4.5.4.orig/libjava/Makefile.am 2011-06-18 11:15:55.000000000 -0400
+++ gcc-4.5.4/libjava/Makefile.am 2011-06-18 11:16:27.000000000 -0400
@@ -451,7 +451,7 @@
libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
$(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
- $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
+ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBICONV)
libgcj_la_LIBADD = \
classpath/native/fdlibm/libfdlibm.la \
java/lang/Object.lo \
--- gcc-4.5.4.orig/libjava/Makefile.in 2011-06-18 11:16:03.000000000 -0400
+++ gcc-4.5.4/libjava/Makefile.in 2011-06-18 11:16:49.000000000 -0400
@@ -1150,7 +1150,7 @@
libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
$(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
- $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
+ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBICONV)
libgcj_la_LIBADD = \
classpath/native/fdlibm/libfdlibm.la \
--- gcc-4.5.4.orig/configure.ac 2011-06-18 11:48:31.000000000 -0400
+++ gcc-4.5.4/configure.ac 2011-06-18 11:46:02.000000000 -0400
@@ -1135,6 +1135,9 @@
tentative_cc="/usr/cygnus/progressive/bin/gcc"
host_makefile_frag="config/mh-lynxrs6k"
;;
+ i[[3456789]]86-*-darwin* | x86_64-*-darwin*)
+ host_makefile_frag="config/mh-x86-darwin"
+ ;;
powerpc-*-darwin*)
host_makefile_frag="config/mh-ppc-darwin"
;;
--- gcc-4.5.4.orig/configure 2011-06-18 11:48:31.000000000 -0400
+++ gcc-4.5.4/configure 2011-06-18 11:47:06.000000000 -0400
@@ -3917,6 +3917,9 @@
tentative_cc="/usr/cygnus/progressive/bin/gcc"
host_makefile_frag="config/mh-lynxrs6k"
;;
+ i[3456789]86-*-darwin* | x86_64-*-darwin*)
+ host_makefile_frag="config/mh-x86-darwin"
+ ;;
powerpc-*-darwin*)
host_makefile_frag="config/mh-ppc-darwin"
;;
--- /dev/null 2011-06-18 11:48:03.000000000 -0400
+++ gcc-4.5.4/config/mh-x86-darwin 2011-06-18 11:52:12.000000000 -0400
@@ -0,0 +1,2 @@
+# Ensure we don't try and use -pie, as it is incompatible with pch.
+BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
--- gcc-4.5.4/gcc/testsuite/lib/prune.exp.orig 2011-02-15 19:06:56.000000000 -0500
+++ gcc-4.5.4/gcc/testsuite/lib/prune.exp 2011-06-30 10:44:26.000000000 -0400
@@ -54,6 +54,9 @@
# Ignore harmless warnings from Xcode 3.2.x.
regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text
+ # Ignore harmless warnings from Xcode 4.0.
+ regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text
+
#send_user "After:$text\n"
return $text
--- gcc-4.5.4/libstdc++-v3/testsuite/lib/prune.exp.orig 2011-02-15 19:06:56.000000000 -0500
+++ gcc-4.5.4/libstdc++-v3/testsuite/lib/prune.exp 2011-06-30 10:46:54.000000000 -0400
@@ -30,5 +30,9 @@
regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
+ # Ignore harmless warnings from Xcode 4.0.
+ regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text
+
+
return $text
}
--- gcc-4.5.4/gcc/tree-vect-stmts.c.orig 2011-05-24 21:29:28.000000000 -0400
+++ gcc-4.5.4/gcc/tree-vect-stmts.c 2011-06-27 11:49:34.000000000 -0400
@@ -4660,6 +4660,15 @@
&& GET_MODE_BITSIZE (inner_mode) != TYPE_PRECISION (scalar_type))
return NULL_TREE;
+ /* We shouldn't end up building VECTOR_TYPEs of non-scalar components.
+ When the component mode passes the above test simply use a type
+ corresponding to that mode. The theory is that any use that
+ would cause problems with this will disable vectorization anyway. */
+ if (!SCALAR_FLOAT_TYPE_P (scalar_type)
+ && !INTEGRAL_TYPE_P (scalar_type)
+ && !POINTER_TYPE_P (scalar_type))
+ scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1);
+
/* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD)
is expected. */
nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes;