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/4869: ICE on inline assembler

[Get raw message] [Get raw message]

>Number:         4869
>Category:       c
>Synopsis:       ICE on inline assembler
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 13 09:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Andris Pavenis
>Release:        gcc-3.1 20011112 (experimental), gcc-3.1 20011030 (experimantal)
>Organization:
>Environment:
i686-pc-linux-gnu: gcc-3.1 20011112
i586-pc-msdosdjgpp: gcc-3.1 20011030
>Description:
gcc-3.1 (specified versions) generates ICE on following 
code which violates aliasing rules. The behaviour of code
is undefined, but it should compile. 

/*  This example causes ICE with gcc-3.1 20011030  */

long long rdtsc (void)
{
    long long Result;
    __asm__ ( "      rdtsc\n"
            : "=ax" ( ((unsigned long *) & Result)[0] ),
              "=dx" ( ((unsigned long *) & Result)[1] )
            );
    return Result;
}

I'm getting following output from
./xgcc -B./ -c bad.c

bad1.c: In function `rdtsc':
bad1.c:11: Internal compiler error in fixup_var_refs_1, at function.c:1912
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Andris

>How-To-Repeat:
gcc -c bad1.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]