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]

c/4603: ICE when mode attrib applied to fn return type



>Number:         4603
>Category:       c
>Synopsis:       ICE when mode attrib applied to fn return type
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 17 23:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Scott McPeak
>Release:        gcc-3.0, gcc-2.95.2, egcs-2.91.66
>Organization:
>Environment:
Linux 2.2, x86, glibc-2.1.2
>Description:
When gcc is run on the following one-line input:

  extern int __attribute__((__mode__(__SI__))) random();

it dies:

  tmp.c:2: Internal compiler error in layout_decl, at stor-layout.c:313

This situation arises from a source-to-source translator,
where random's return type is declared to be "int32_t",
which itself is a typedef involving __mode__(__si__).
The s2s tool translates typedefs away, and when it prints
the result of its processing, the above is the result.
>How-To-Repeat:
gcc tmp.c
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="tmp.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="tmp.c"

CmV4dGVybiBpbnQgX19hdHRyaWJ1dGVfXygoX19tb2RlX18oX19TSV9fKSkpIHJhbmRvbSgpICAg
ICAgICA7Cgo=


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