https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114634

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12/13/14 Regression]    |[11/12/13 Regression] Crash
                   |Crash Issue Encountered in  |Issue Encountered in GCC
                   |GCC Compilation of Template |Compilation of Template
                   |Code with Aligned Attribute |Code with Aligned Attribute
                   |since r9-1745               |since r9-1745

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
commit r14-9962-g7ec54f5fdfec298812a749699874db4d6a7246bb                       
Author: Jakub Jelinek <ja...@redhat.com>                                        
Date:   Mon Apr 15 10:25:22 2024 +0200                                          

    attribs: Don't crash on NULL TREE_TYPE in diag_attr_exclusions [PR114634]   

    The enumerator still doesn't have TREE_TYPE set but diag_attr_exclusions    
    assumes that all decls must have types.                                     
    I think it is better in something as unimportant as diag_attr_exclusions    
    to be more robust, if there is no type, it can just diagnose exclusions     
    on the DECL_ATTRIBUTES, like for types it only diagnoses it on              
    TYPE_ATTRIBUTES.                                                            

    2024-04-15  Jakub Jelinek  <ja...@redhat.com>                               

            PR c++/114634                                                       
            * attribs.cc (diag_attr_exclusions): Set attrs[1] to NULL_TREE for  
            decls with NULL TREE_TYPE.                                          

            * g++.dg/ext/attrib68.C: New test.

Reply via email to