Commit 7b56b2f8 by Marek Polacek Committed by Marek Polacek

re PR c/61553 (__atomic_store with non-pointer arg ICE)

	PR c/61553
	* c-common.c (get_atomic_generic_size): Don't segfault if the
	type doesn't have a size.

	* c-c++-common/pr61553.c: New test.

Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>

From-SVN: r211905
parent e5d8bd8c
2014-06-23 Marek Polacek <polacek@redhat.com>
Andrew MacLeod <amacleod@redhat.com>
PR c/61553
* c-common.c (get_atomic_generic_size): Don't segfault if the
type doesn't have a size.
2014-06-20 Marek Polacek <polacek@redhat.com>
* c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
......
......@@ -10471,7 +10471,8 @@ get_atomic_generic_size (location_t loc, tree function,
function);
return 0;
}
size = tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (type)));
tree type_size = TYPE_SIZE_UNIT (TREE_TYPE (type));
size = type_size ? tree_to_uhwi (type_size) : 0;
if (size != size_0)
{
error_at (loc, "size mismatch in argument %d of %qE", x + 1,
......
2014-06-23 Marek Polacek <polacek@redhat.com>
PR c/61553
* c-c++-common/pr61553.c: New test.
2014-06-23 Richard Biener <rguenther@suse.de>
* g++.dg/vect/slp-pr50413.cc: Scan and cleanup appropriate SLP dumps.
......
/* PR c/61553 */
/* { dg-do compile } */
void
foo (char *s)
{
__atomic_store (s, (void *) 0, __ATOMIC_SEQ_CST);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment