summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/builtin-object-size-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/builtin-object-size-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-1.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-1.c b/gcc/testsuite/gcc.dg/builtin-object-size-1.c
index 404b7117f88..13ebeb15b25 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-1.c
@@ -64,7 +64,11 @@ test1 (void *q, int x)
r = malloc (30);
else
r = calloc (2, 16);
- if (__builtin_object_size (r, 0) != 2 * 16)
+ /* We may duplicate this test onto the two exit paths. On one path
+ the size will be 32, the other it will be 30. If we don't duplicate
+ this test, then the size will be 32. */
+ if (__builtin_object_size (r, 0) != 2 * 16
+ && __builtin_object_size (r, 0) != 30)
abort ();
if (x < 20)
r = malloc (30);