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]

Bug Report - gcc 2.95, Hitachi SH target


Version  : gcc-2.95
Host     : hppa2.0-hp-hpux10.20
Target   : sh-hitachi-hms
Options  : -O -m3

bug.c:
------
typedef enum
{
    Ident_1,
    Ident_2,
    Ident_3,
    Ident_5
} Enumeration;


void Proc_6 (Enumeration Enum_Val_Par, Enumeration* Enum_Ref_Par)
{
    switch (Enum_Val_Par)
    {
    case Ident_1: 
        break;
    case Ident_2: 
        break;
    case Ident_3:
        *Enum_Ref_Par = Ident_2;
        break;
    case Ident_5: 
        break;
    }
}

I reported this bug first for one of the development snapshots.
Some kind person fixed the bug for me, and then the next snapshot,
the bug returned.

This piece of code is the smallest I can produce which causes the
bug to occur. I have seen the same error message reported for other
code, unfortunately that code is proprietary. The above code is part
of dhrystone 2.1.

The command line which reproduces the bug is as follows, the error reported
is below it:

% sh-hms-gcc -O -m3 bug.c

bug.c: In function `Proc_6':
bug.c:24: Internal compiler error in `make_edges', at flow.c:967
Please submit a full bug report.
See <URL:http://egcs.cygnus.com/faq.html#bugreport> for instructions.

Removing either the -O or the -m3 causes the problem to go away.
I have also built the compiler on a linux platform and the bug
still appears, so I guess it would be a little easier to find.

Kind Regards,

Tom Haywood,
R&D Software Engineer,
Hewlett-Packard Australia Ltd.


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