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

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Fixed the first case, and now there is a second.

Again, can't reproduce using equivalent C++ with g++. This time however I have
no idea why, as both look like they produce identical codegen on the surface. 
One key difference in data types is that SArray is a built-in type S[] in D. 
But otherwise ABI should be identical.

---
struct S
{
};

struct SArray
{
  size_t length;
  void* ptr;
};

void formattedWrite (SArray, S)
{
  void (*funs)(S) = 0;
  funs (S ());
}

int format (SArray fmt, S args)
{
  formattedWrite (fmt, args);
  return 1;
}
---

bug.d: In function ‘format’:
bug.d:15:1: internal compiler error: Segmentation fault
0xbc7186 crash_signal
        ../../dev/gcc/toplev.c:334
0xe954c8 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../dev/gcc/tree.h:3111
0xe954c8 tracked_record_parameter_p
        ../../dev/gcc/var-tracking.c:5038
0xe9a4ac add_stores
        ../../dev/gcc/var-tracking.c:5954
0xe961e7 add_with_sets
        ../../dev/gcc/var-tracking.c:6495
0x80e957 cselib_record_sets
        ../../dev/gcc/cselib.c:2562
0x810161 cselib_process_insn(rtx_insn*)
        ../../dev/gcc/cselib.c:2674
0xea5d63 vt_initialize
        ../../dev/gcc/var-tracking.c:10037
0xeab2e6 variable_tracking_main_1
        ../../dev/gcc/var-tracking.c:10234
0xeab2e6 variable_tracking_main()
        ../../dev/gcc/var-tracking.c:10287
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