https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120030
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <[email protected]>: https://gcc.gnu.org/g:6a1cb23b73dad5bab5b8cabc8102f375dc285c52 commit r16-8032-g6a1cb23b73dad5bab5b8cabc8102f375dc285c52 Author: Andrew Pinski <[email protected]> Date: Wed Mar 11 14:41:31 2026 -0700 symtab: Fix init and fini priority to reset to default [PR120030] Right now if try to reset the priority of a constructor to the default (65535), there is an ICE. To fix this the assert is wrong and intead we should check if the priority is already the default if not then we should just update it. Bootstrapped and tested on x86_64-linux-gnu. PR middle-end/120030 gcc/ChangeLog: * symtab.cc (symtab_node::set_init_priority): Better handle the case of setting the priority back to default. (cgraph_node::set_fini_priority): Likewise. gcc/testsuite/ChangeLog: * gcc.dg/constructor-2.c: New test. Signed-off-by: Andrew Pinski <[email protected]>
