blob: 6579b1926fa6de95d524a606ad9c58fd48b8c50b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* { dg-do link } */
/* { dg-options "-flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis -fprint-cast-analysis -Wno-incompatible-pointer-types" } */
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
struct astruct_s
{
_Bool a;
_Bool b;
_Bool c;
};
int
main (int argc, char **argv)
{
struct astruct_s *a = malloc (sizeof (struct astruct_s));
}
// This says that astruct_s is not casted
/* { dg-final { scan-wpa-ipa-dump " record astruct_s .boolean_type a;boolean_type b;boolean_type c;. reason: e=0 g=0 p=0 r=0 c=0 v=0 u=0 i=0" "type-escape-analysis" } } */
/* { dg-final { scan-wpa-ipa-dump " record astruct_s .boolean_type a;boolean_type b;boolean_type c;.. reason: e=0 g=0 p=0 r=0 c=0 v=0 u=0 i=0"
"type-escape-analysis" } } */
|