Regression introduced when I added support for merging forward
declarations with their corresponding types because they do not
have a size.
-/* $OpenBSD: parse.c,v 1.10 2017/10/31 10:08:51 mpi Exp $ */
+/* $OpenBSD: parse.c,v 1.11 2018/01/31 14:47:13 mpi Exp $ */
/*
* Copyright (c) 2016-2017 Martin Pieuchot
if ((diff = (a->it_type - b->it_type)) != 0)
return diff;
+ /* Basic types need to have the same size. */
+ if ((a->it_type == CTF_K_INTEGER || a->it_type == CTF_K_FLOAT) &&
+ (diff = (a->it_size - b->it_size) != 0))
+ return diff;
+
/* Match by name */
if (!(a->it_flags & ITF_ANON) && !(b->it_flags & ITF_ANON))
return strcmp(it_name(a), it_name(b));