https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108402
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This has nothing to do with ftrivial-auto-var-init=pattern . But rather you are passing an uninitiated struct to a function that takes a pointer to a const type. That causes the warning. Can you attach the original source as the reduced one has a correct warning.