benshi001 wrote:

Is this change necessary? I find there is not change in the size of addrspace 
0/1 pointers, before and after your patch.

for program 
```c++
clang a.c --target=avr -mmcu=atmega2560
int gf(int a);
int (*p)(int) = gf;
int f;
int *p1 = &f;
```

the generated assembly is unique by before/after applying your patch.

```assembly
        .type   p,@object                       ; @p
        .data
        .globl  p
p:
        .short  pm(gf)
        .size   p, 2

        .type   f,@object                       ; @f
        .section        .bss,"aw",@nobits
        .globl  f
f:
        .short  0                               ; 0x0
        .size   f, 2

        .type   p1,@object                      ; @p1
        .data
        .globl  p1
p1:
        .short  f
        .size   p1, 2
```

https://github.com/llvm/llvm-project/pull/134254
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to