Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/mallign.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Check that malloc's alignment honors what we trust it | |
2 minimally should. */ | |
3 | |
4 /* { dg-do run } */ | |
5 /* { dg-options "-fno-builtin-malloc" } */ | |
6 | |
7 #include <stdlib.h> | |
8 typedef int word __attribute__((mode(word))); | |
9 | |
10 int main() | |
11 { | |
12 if ((__UINTPTR_TYPE__)malloc (1) & (sizeof(word)-1)) | |
13 abort (); | |
14 return 0; | |
15 } |