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]

[Bug middle-end/69780] New: ICE on __builtin_alloca_with_align with small alignment


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69780

            Bug ID: 69780
           Summary: ICE on  __builtin_alloca_with_align with small
                    alignment
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The following causes an ICE in today's trunk on at least powerpc64le and
x86_64.  The ICE disappears with optimization.  I'm guessing at the affected
component.

Even though my 5.1.0 compiles the code fine, based on my bisection the ICE
first appeared in r186681.

I realize __builtin_alloca_with_align() is undocumented (and apparently
untested by unit tests of its own).  It's also possible that the test case
below is invalid.  I uncovered this problem while attempting to add
documentation for it (to resolve bug 69759).

$ cat x.c && /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -Wall -Wextra
-Wpedantic -xc x.c
void bar (void)
{
  void *p = __builtin_alloca_with_align (1, 1);
}
x.c: In function âbarâ:
x.c:3:9: warning: unused variable âpâ [-Wunused-variable]
   void *p = __builtin_alloca_with_align (1, 1);
         ^
x.c:3:9: internal compiler error: RTL flag check: REG_POINTER used with
unexpected rtx code 'const_int' in mark_reg_pointer, at emit-rtl.c:1316
   void *p = __builtin_alloca_with_align (1, 1);
         ^
0x10c5e26f rtl_check_failed_flag(char const*, rtx_def const*, char const*, int,
char const*)
        /src/gcc/trunk/gcc/rtl.c:878
0x106d267f mark_reg_pointer(rtx_def*, int)
        /src/gcc/trunk/gcc/emit-rtl.c:1316
0x10708427 allocate_dynamic_stack_space(rtx_def*, unsigned int, unsigned int,
bool)
        /src/gcc/trunk/gcc/explow.c:1495
0x104fd04f expand_builtin_alloca
        /src/gcc/trunk/gcc/builtins.c:4343
0x10504873 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        /src/gcc/trunk/gcc/builtins.c:5876
0x10754e63 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /src/gcc/trunk/gcc/expr.c:10572
0x10746b23 expand_expr_real(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /src/gcc/trunk/gcc/expr.c:7947
0x1073b4bf store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
        /src/gcc/trunk/gcc/expr.c:5409
0x10739c3b expand_assignment(tree_node*, tree_node*, bool)
        /src/gcc/trunk/gcc/expr.c:5175
0x1054985f expand_call_stmt
        /src/gcc/trunk/gcc/cfgexpand.c:2646
0x1054d4e7 expand_gimple_stmt_1
        /src/gcc/trunk/gcc/cfgexpand.c:3536
0x1054dddf expand_gimple_stmt
        /src/gcc/trunk/gcc/cfgexpand.c:3702
0x10557533 expand_gimple_basic_block
        /src/gcc/trunk/gcc/cfgexpand.c:5708
0x1055975b execute
        /src/gcc/trunk/gcc/cfgexpand.c:6323
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$

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