https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59562
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-04-15 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 Known to fail| |4.8.3, 4.9.3, 5.3.0, 6.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- I agree that the builtin should evaluate to a constant expression when its argument does. The same could be said about many other builtins as well (see for example bug 68120, and the C++ bug 70507). Confirmed: $ cat v.c && gcc -S -Wall -Wextra -Wpedantic -xc v.c int i = 0; int *p = &i; void *q = __builtin_assume_aligned (p, 4); v.c:3:11: error: initializer element is not constant void *q = __builtin_assume_aligned (p, 4); ^~~~~~~~~~~~~~~~~~~~~~~~