Commit 7c1bc95a by Jan Hubicka Committed by Jan Hubicka

lto-streamer-out.c (cmp_symbol_files): Watch for overflow.


	* lto-streamer-out.c (cmp_symbol_files): Watch for overflow.

From-SVN: r277348
parent 45012be1
2019-10-23 Jan Hubicka <hubicka@ucw.cz> 2019-10-23 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-out.c (cmp_symbol_files): Watch for overflow.
2019-10-23 Jan Hubicka <hubicka@ucw.cz>
* ipa-reference.c (varpool_removal_hook, ipa_reference_c_finalize): Fix * ipa-reference.c (varpool_removal_hook, ipa_reference_c_finalize): Fix
previous patch. previous patch.
...@@ -2447,7 +2447,12 @@ cmp_symbol_files (const void *pn1, const void *pn2) ...@@ -2447,7 +2447,12 @@ cmp_symbol_files (const void *pn1, const void *pn2)
/* Order within static library. */ /* Order within static library. */
if (n1->lto_file_data && n1->lto_file_data->id != n2->lto_file_data->id) if (n1->lto_file_data && n1->lto_file_data->id != n2->lto_file_data->id)
return n1->lto_file_data->id - n2->lto_file_data->id; {
if (n1->lto_file_data->id > n2->lto_file_data->id)
return 1;
if (n1->lto_file_data->id < n2->lto_file_data->id)
return -1;
}
/* And finaly order by the definition order. */ /* And finaly order by the definition order. */
return n1->order - n2->order; return n1->order - n2->order;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment