This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c/4837: Addressing Probrem?



>Number:         4837
>Category:       c
>Synopsis:       Addressing Probrem?
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 08 16:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Hiroshi Chonan
>Release:        gcc version 3.0.0
>Organization:
>Environment:
configure --prefix=/opt/local --enable-shared --enable-threads=solaris sparcv9-sun-solaris2 --enable-languages=c,c++

Solaris 2.8 with SUN Blade 100
>Description:
gcc reports Internal error with Segmantation fault.

gcc -v -save-temps log are below.
-----------------------------------------------------------
Reading specs from /opt/local/lib/gcc-lib/sparcv9-sun-solaris2/3.0/specs
Configured with: ../configure --prefix=/opt/local --enable-shared --enable-threa
ds=solaris sparcv9-sun-solaris2 --enable-languages=c,c++
Thread model: solaris
gcc version 3.0
 /opt/local/lib/gcc-lib/sparcv9-sun-solaris2/3.0/cpp0 -lang-c -v -D__GNUC__=3 -D
__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR
4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__uni
x -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__SIZE_TYPE_
_=long unsigned int -D__PTRDIFF_TYPE__=long int -D__WCHAR_TYPE__=int -D__WINT_TY
PE__=int -D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9 test.c test.i
GNU CPP version 3.0 (cpplib) (sparc)
ignoring nonexistent directory "/opt/local/sparcv9-sun-solaris2/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/local/include
 /opt/local/lib/gcc-lib/sparcv9-sun-solaris2/3.0/include
 /usr/include
End of search list.
 /opt/local/lib/gcc-lib/sparcv9-sun-solaris2/3.0/cc1 -fpreprocessed test.i -quie
t -dumpbase test.c -version -o test.s
GNU CPP version 3.0 (cpplib) (sparc)
GNU C version 3.0 (sparcv9-sun-solaris2)
        compiled by GNU C version 3.0.
test.c:10: Internal error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
-----------------------------------------------------------

C Cource file test.c below
-----------------------------------------------------------
typedef struct _sample {
        const char *(*strs)[];
} sample;

static const char *aaa[] = { "STR1", "STR2", 0L } ;

static sample new_sample = {
        &aaa
};
-----------------------------------------------------------

Preprocessed file test.i below
-----------------------------------------------------------
# 2 "test.c"
typedef struct _sample {
        const char *(*strs)[];
} sample;

static const char *aaa[] = { "STR1", "STR2", 0L } ;

static sample new_sample = {
        &aaa
};
-----------------------------------------------------------

Generated Assembler code test.s below.
-----------------------------------------------------------
        .file   "test.i"
        .section        ".rodata"
        .align 8
.LLC0:
        .asciz  "STR1"
        .align 8
.LLC1:
        .asciz  "STR2"
        .section        ".data"
        .align 8
        .type   aaa,#object
        .size   aaa,24
aaa:
        .xword  .LLC0
        .xword  .LLC1
        .uaword 0
        .uaword 0
-----------------------------------------------------------

>How-To-Repeat:
compile test.c with "gcc -v -save-temps -c test.c"
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]