blob: e1ee08768a31ab0991eddfb23c2af85247687b16 [file] [log] [blame]
David Blaikie9417b052012-11-02 20:49:01 +00001// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -g %s | FileCheck %s
Daniel Dunbard7f60502008-11-08 04:42:29 +00002
Chris Lattner5c11d4e2008-11-11 06:27:34 +00003// PR3023
Daniel Dunbard7f60502008-11-08 04:42:29 +00004void convert(void) {
5 struct { typeof(0) f0; } v0;
6}
Chris Lattner14132172008-11-11 06:42:53 +00007
Mike Stump91cc8152009-10-23 01:52:13 +00008
Chris Lattner14132172008-11-11 06:42:53 +00009// PR2784
David Blaikie9417b052012-11-02 20:49:01 +000010struct OPAQUE; // CHECK: DW_TAG_structure_type
Chris Lattner14132172008-11-11 06:42:53 +000011typedef struct OPAQUE *PTR;
12PTR p;
13
14
15// PR2950
16struct s0;
17struct s0 { struct s0 *p; } g0;
18
19struct s0 *f0(struct s0 *a0) {
20 return a0->p;
21}
Nuno Lopes010d5142009-01-28 00:35:17 +000022
Mike Stump91cc8152009-10-23 01:52:13 +000023
Anders Carlsson4d6e8dd2008-11-26 17:40:42 +000024// PR3134
25char xpto[];
26
Mike Stump91cc8152009-10-23 01:52:13 +000027
Nuno Lopes010d5142009-01-28 00:35:17 +000028// PR3427
29struct foo {
Mike Stump1eb44332009-09-09 15:08:12 +000030 int a;
31 void *ptrs[];
Nuno Lopes010d5142009-01-28 00:35:17 +000032};
33struct foo bar;
Eli Friedman3189e4b2009-05-04 04:39:55 +000034
Mike Stump91cc8152009-10-23 01:52:13 +000035
Eli Friedman3189e4b2009-05-04 04:39:55 +000036// PR4143
37struct foo2 {
Mike Stump1eb44332009-09-09 15:08:12 +000038 enum bar *bar;
Eli Friedman3189e4b2009-05-04 04:39:55 +000039};
40
41struct foo2 foo2;
Mike Stump91cc8152009-10-23 01:52:13 +000042
43
Mike Stump386378d2009-10-23 02:13:20 +000044// Radar 7325611
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -070045// CHECK: !MDDerivedType(tag: DW_TAG_typedef, name: "barfoo"
Mike Stump91cc8152009-10-23 01:52:13 +000046typedef int barfoo;
47barfoo foo() {
48}
Devang Patel31c79b42011-05-05 17:06:30 +000049
50// CHECK: __uint128_t
51__uint128_t foo128 ()
52{
53 __uint128_t int128 = 44;
54 return int128;
55}
Devang Pateld15608e2011-07-13 21:23:30 +000056
57// CHECK: uint64x2_t
58typedef unsigned long long uint64_t;
59typedef uint64_t uint64x2_t __attribute__((ext_vector_type(2)));
60uint64x2_t extvectbar[4];