[Bug c/58588] New: "internal compiler error: Segmentation fault" from aligned attribute with undefined token for size

dbruening at acm dot org gcc-bugzilla@gcc.gnu.org
Mon Sep 30 23:58:00 GMT 2013


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

            Bug ID: 58588
           Summary: "internal compiler error: Segmentation fault" from
                    aligned attribute with undefined token for size
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dbruening at acm dot org
              Host: Fedora 17
            Target: x86_64-redhat-linux
             Build: gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC)

Created attachment 30942
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30942&action=edit
"Preprocessed source stored into /tmp/ccmaOY7z.out file, please attach this to
your bugreport."

This one-line file reproduces the problem:

int __attribute__ ((aligned (UNDEFINED_VALUE))) foo;

It results in "internal compiler error: Segmentation fault" as shown below:

% gcc -v -save-temps -c gcc-crash.c 
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --disable-build-with-cxx
--disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.7.2/cc1 -E -quiet -v gcc-crash.c
-mtune=generic -march=x86-64 -fpch-preprocess -o gcc-crash.i
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.7.2/include-fixed"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/4.7.2/include
 /usr/local/include
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.7.2/cc1 -fpreprocessed gcc-crash.i
-quiet -dumpbase gcc-crash.c -mtune=generic -march=x86-64 -auxbase gcc-crash
-version -o gcc-crash.s
GNU C (GCC) version 4.7.2 20120921 (Red Hat 4.7.2-2) (x86_64-redhat-linux)
        compiled by GNU C version 4.7.2 20120921 (Red Hat 4.7.2-2), GMP version
5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.7.2 20120921 (Red Hat 4.7.2-2) (x86_64-redhat-linux)
        compiled by GNU C version 4.7.2 20120921 (Red Hat 4.7.2-2), GMP version
5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1ddc7c1a4fba2159f711c3e228ac3970
gcc-crash.c:1:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccmaOY7z.out file, please attach this to
your bugreport.

% cat /tmp/ccmaOY7z.out
// /usr/libexec/gcc/x86_64-redhat-linux/4.7.2/cc1 -fpreprocessed gcc-crash.i
-quiet -dumpbase gcc-crash.c -mtune=generic -march=x86-64 -auxbase gcc-crash
-version -o - -frandom-seed=0
# 1 "gcc-crash.c"
# 1 "<command-line>"
# 1 "gcc-crash.c"
int __attribute__ ((aligned (UNDEFINED_VALUE))) foo;

% cat gcc-crash.i
# 1 "gcc-crash.c"
# 1 "<command-line>"
# 1 "gcc-crash.c"
int __attribute__ ((aligned (UNDEFINED_VALUE))) foo;


I do not have access to a more recent gcc so I'm not sure whether this has been
fixed since 4.7.2.



More information about the Gcc-bugs mailing list