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

            Bug ID: 70875
           Summary: ICE in get_ubsan_type_info_for_type with
                    -fsanitize=undefined
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav at gmail dot com
  Target Milestone: ---

/* gcc -fsanitize=undefined */
int foo (int n, int k)
{
  struct S
  {
    int i[n];
    int value;
  } s[2];
  return s[k].value = 0;
}

int main ()
{
 return foo (2, 0);
}
/* p.c: In function ‘foo’:
 * p.c:2:5: internal compiler error: in get_ubsan_type_info_for_type, at
ubsan.c:305
 *  int foo (int n, int k)
 *       ^~~
 * 0x9e54e4 get_ubsan_type_info_for_type
 * ../../gcc-6.1.0/gcc/ubsan.c:305
 * 0x9e54e4 ubsan_type_descriptor(tree_node*, ubsan_print_style)
 * ../../gcc-6.1.0/gcc/ubsan.c:454
 * 0x9e5709 ubsan_expand_bounds_ifn(gimple_stmt_iterator*)
 * ../../gcc-6.1.0/gcc/ubsan.c:692
 * 0x9ea7e9 execute
 * ../../gcc-6.1.0/gcc/sanopt.c:696
 * 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.
 */

Reply via email to