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]

target/5307: Infinite loop in cc1 on sparcv9-sun-solaris2.8 with -m64, short example



>Number:         5307
>Category:       target
>Synopsis:       Infinite loop in cc1 on sparcv9-sun-solaris2.8 with -m64, short example
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 07 20:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     B. Lucier
>Release:        unknown-1.0
>Organization:
>Environment:
sparcv9-sun-solaris2.8
gcc version 3.1 20020102 (experimental)
>Description:
cc1 seems to go into have an infinite loop on
sparcv9-sun-solaris2.8
for the following short program, which is extracted from
my main application (so to me, the bug is critical).
The compile line is

/pkgs/gcc-3.1v9/lib/gcc-lib/sparcv9-sun-solaris2.8/3.1/cc1 -m64 -fPIC -O1 -fschedule-insns2 -fno-strict-aliasing -fno-math-errno -mcpu=ultrasparc -mtune=ultrasparc -Wall -W -Wno-unused symkey.i

/* program starts */

extern long symkey_table(unsigned int subtype);

extern long hash_utf8string(char *str);

extern unsigned int ___utf8_get(char **ptr);

extern long find_symkey_from_utf8string(char *str, unsigned int subtype)

{
    long h;
    long probe;

    h = hash_utf8string(str);

    if (h < ((long) (0) << 2))
        return h;

    probe = (*((((long *) ((symkey_table(subtype)) - (1))) + 1) + ((h) >> 2) % 359));

    while (probe != (((long) -3 << 2) + 2))
    {
        long name = (*((((long *) ((probe) - (1))) + 1) + 0));
        unsigned long i;
        unsigned long n = ((((long) ((((unsigned long) ((*((long *) ((name) - (1))))) >> (3 + 5)) >> 1)) << 2)) >> 2);
        char *p = str;
        for (i = 0; i < n; i++)
            if (___utf8_get(&p) !=
                ((unsigned int) ((((((long) (unsigned short) (*((unsigned short *) ((((long *) ((name) - (1))) + 1)) + ((((long) (i) << 2)) >> 2))) << 2) + 2)) >> 2))))
                goto next;
        if (___utf8_get(&p) == 0)
            return probe;
next:
        probe = (*((((long *) ((probe) - (1))) + 1) + 2));
    }

    return (((long) -1 << 2) + 2);
}

/* program ends */
>How-To-Repeat:

>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]