optimization/5742: bug with -freg-struct-return and functions returning 1 byte values

reed@reedkotler.com reed@reedkotler.com
Wed Feb 20 17:36:00 GMT 2002


>Number:         5742
>Category:       optimization
>Synopsis:       bug with -freg-struct-return and functions returning 1 byte values
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 20 16:16:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     reed@reedkotler.com
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
I am including a few line makefile and C file.

THe compiler was built as a mips-elf compiler under 3.0.3 .

This was not a problem under 2.95.2 (I believe)
>How-To-Repeat:
mips-elf-gcc -O -freg-struct-return bug1.c
>Fix:
I am looking at it too but wanted to submit the bug also.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="bug1.C"
Content-Disposition: inline; filename="bug1.C"

struct my_bool {
        char value;
};
struct my_bool test_func(
)
{
        struct my_bool result;
        return result;
}






More information about the Gcc-bugs mailing list