[Bug optimization/15114] [3.4/3.5 regression] -funit-at-a-time causes compilation of functions with variable length arrays to fail

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Apr 25 14:28:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-25 13:56 -------
It has nothing to do with getting the parameter decls mixed up but the problem is that the RTL for the 
parameter has not be made yet, why it works with one function is most likely unit-at-a-time acts as 
non-unit-at-a-time mode. 


Breakpoint 4, expand_expr_real_1 (exp=0x41650180, target=0x41654738, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/expr.c:6510
6510          if (!DECL_RTL_SET_P (exp))
(gdb) p debug_generic_expr (exp)
n<D1083>
$1 = void
(gdb) continue
Continuing.

Breakpoint 4, expand_expr_real_1 (exp=0x41650180, target=0x41654768, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/expr.c:6510
6510          if (!DECL_RTL_SET_P (exp))
(gdb) p debug_generic_expr (exp)
n<D1083>
$2 = void
(gdb) continue
Continuing.

Breakpoint 4, expand_expr_real_1 (exp=0x41650780, target=0x41654798, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/expr.c:6510
6510          if (!DECL_RTL_SET_P (exp))
(gdb) p debug_generic_expr (exp)
n<D1087>
$3 = void
(gdb) continue
Continuing.

pr15114.c: In function `foo':
pr15114.c:2: error: prior parameter's size depends on 'n'

Breakpoint 4, expand_expr_real_1 (exp=0x41650780, target=0x416547c8, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0) at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/expr.c:6510
6510          if (!DECL_RTL_SET_P (exp))
(gdb) p debug_generic_expr (exp)
n<D1087>
$4 = void
(gdb) continue

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15114



More information about the Gcc-bugs mailing list