This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/79649] Memset pattern in named address space crashes compiler or generates wrong code
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Feb 2017 08:58:19 +0000
- Subject: [Bug tree-optimization/79649] Memset pattern in named address space crashes compiler or generates wrong code
- Auto-submitted: auto-generated
- References: <bug-79649-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79649
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
typedef __SIZE_TYPE__ size_t;
struct A { int a; char b[1024]; };
extern struct A __seg_gs a;
void
f1 (size_t n)
{
for (size_t i = 0; i < n; ++i)
a.b[i] = 0;
}
certainly compiles fine with my patch.