This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH] Don't crash on vector_size attribute in templates (PR c++/34913)


Hi!

When processing_template_decl, reconstruct_complex_type hack which is
called from handle_vector_size_attribute is dangerous, as e.g. when array
size is dependent, C++ private tree codes leak into middle-end where they
cause problems.

Attached are 2 alternative patches (depending on which patch is acked if any
for PR c++/34914), which work around this by going through the ARRAY_TYPEs
etc. in cplus_decl_attributes before calling middle-end decl_attributes,
call middle-end decl_attributes on the inner type which is supposed to
become a vector and then reconstruct the complex type using an alternative
reconstruct_complex_type.
The second patch has been bootstrapped/regtested on x86_64-linux.

Ok for trunk?

	Jakub

Attachment: Z126
Description: Text document

Attachment: Z126a
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]