aykevl added a comment. avr-gcc checks whether the device supports the flash bank used. For example:
$ cat test.c int d = 5; const int ro = 5; __flash const int f = 5; __flash1 const int f1 = 5; __flash2 const int f2 = 5; $ avr-gcc -mmcu=attiny84 -Os -c -o test.o test.c test.c:4:20: error: variable ‘f1’ located in address space ‘__flash1’ beyond flash of 64 KiB __flash1 const int f1 = 5; ^ test.c:5:20: error: variable ‘f2’ located in address space ‘__flash2’ beyond flash of 64 KiB __flash2 const int f2 = 5; ^ It does not appear that this patch has a similar check, while I think that would be useful. Or did you leave it out intentionally? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115982/new/ https://reviews.llvm.org/D115982 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits