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]

Re: ICE size_binop, at fold-const.c:1914 with gcc 3.0 i686-pc-linux-gnu


> In looking at the failure of gcc.c-torture/compile/20010605-1.c on the
> PA, I wondered if a similar failure would occur using a `block' argument:
> 
> # 1 "/xxx/gnu/gcc-3.1/gcc/testsuite/gcc.c-torture/compile/20010810-1.c"
> int
> main (int argc, char **argv)
> {
>   int size = 10;
> 
>   typedef struct {
>     char val[size];
>   } block;
>   int retframe_block (b)
>       block b;
>     {
>       return sizeof (b);
>     }
> 
>   return 0;
> }

With a slightly hacked pa.h on hppa1.1-hp-hpux10.20, the program causes
an abort at function.c:5597 in fix_lexical_addr.  This is called as
follows:

#0  fix_lexical_addr (addr=0x7adbb4d0, var=0x7ade3800)
    at ../../gcc/function.c:5588
#1  0x115f9c in expand_expr (exp=0x7ade3800, target=0x0, tmode=SImode,
    modifier=EXPAND_MEMORY_USE_BAD) at ../../gcc/expr.c:6492
#2  0x2811c0 in expr_size (exp=0x7add94d0) at ../../gcc/explow.c:302
#3  0x17a368 in assign_parms (fndecl=0x7add93f0) at ../../gcc/function.c:4826
#4  0x180904 in expand_function_start (subr=0x7add93f0, parms_have_cleanups=0)
    at ../../gcc/function.c:6503

fix_lexical_addr needs context_display for the current function when
basereg == virtual_stack_vars_rtx.  However, expand_function_start doesn't
set context_display until after assign_parms is called.  Yuck:-(

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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