[Bug plugins/62252] New: a callback to event PLUGIN_FINISH_TYPE segfaults

2014-08-24 Thread klemen.jan.enova at gmail dot com
Component: plugins Assignee: unassigned at gcc dot gnu.org Reporter: klemen.jan.enova at gmail dot com The following plugin is a reduced version of testsuite/g++.dg/plugin/dumb_plugin.c. I tested it with - the ubuntu binary version of gcc-4.9 - ubuntu binary version of gcc-4.8 (g

[Bug plugins/62252] a callback to event PLUGIN_FINISH_TYPE segfaults

2014-08-24 Thread klemen.jan.enova at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62252 --- Comment #2 from klemen.jan.enova at gmail dot com --- TREE_CODE(type) returns an ERROR_MARK. So, (tree) event_data must not alias with a tree. This plugin is from https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/g%2B%2B.dg/plugin

[Bug plugins/62252] a callback to event PLUGIN_FINISH_TYPE segfaults

2014-08-24 Thread klemen.jan.enova at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62252 --- Comment #3 from klemen.jan.enova at gmail dot com --- It works on gcc, though. in gcc/c/c-parser.c: if (!typespec_ok) goto out; invoke_plugin_callbacks (PLUGIN_FINISH_TYPE, t.spec); declspecs_add_type

[Bug plugins/62252] a callback to event PLUGIN_FINISH_TYPE segfaults

2014-08-25 Thread klemen.jan.enova at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62252 klemen.jan.enova at gmail dot com changed: What|Removed |Added CC||klemen.jan.enova

[Bug plugins/62252] a callback to event PLUGIN_FINISH_TYPE segfaults

2014-08-25 Thread klemen.jan.enova at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62252 --- Comment #5 from klemen.jan.enova at gmail dot com --- The build passed make check, but I said invoke_plugin_callback() should be before cp_parser_set_decl_spec_type(), so I will try that way too.