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]

Re: RFA: Prevent an ICE when redeclaring a static function as weak


On 02/17/2016 07:24 AM, Nick Clifton wrote:
Hi Guys,

   Redefining a previously defined static function as both public and
   weak triggers an ICE in ipa-visibility.c:

internal compiler error: in function_and_variable_visibility, at ipa-visibility.c:518

   This bug has been discussed and patch proposed here:

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

   This submission is an updated version of that patch, made against
   the latest gcc sources.  It still chooses to generate an error message
   and disallow the conversion, which I hope is the correct action.

   OK to apply ?

Cheers
   Nick

gcc/ChangeLog
2016-02-17  Nick Clifton  <nickc@redhat.com>

	PR middle-end/49889
	* varasm.c (merge_weak): Generate an error if an attempt is made
	to convert a non-weak static function into a weak, public function.

gcc/testsuite/ChangeLog
2016-02-17  Nick Clifton  <nickc@redhat.com>

	PR middle-end/49889
	* gcc.dg/pr49889.c: New test.
Does this fix a regression? Essentially I'm trying to figure out if we want this for gcc-6 or gcc-7.

jeff


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