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

            Bug ID: 63638
           Summary: [4.9 Regression] internal compiler error: in
                    asan_expand_check_ifn (with -fsanitize=address)
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ai.azuma at gmail dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org

Created attachment 33802
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33802&action=edit
Output of -v option and preprocessed file

The following code causes an ICE on GCC 4.9.2 20141022 with -fsanitize=address.

//================================
// <string> header is supposed to
// be required for memcpy, but
// there is an implicit built-in
// declaration.
//#include<string>

struct S{
  long d0, d1, d2, d3, d4, d5, d6;
};

struct S s[6];

int f()
{
  struct S *p;
  memcpy(p, &s[2], sizeof(*p));
  memcpy(p, &s[1], sizeof(*p));
}
//================================

The above code successfully compiles on GCC 4.9.2 20141015 with
-fsanitize=address, so it seems a regression that has been introduced between
them. The reproducer originally comes from GMP 6.0.0a configure script.

Reply via email to