public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/113204] [14 Regression] lto1: error: qsort comparator non-negative on sorted output: 64 Date: Tue, 02 Jan 2024 18:51:01 +0000 [thread overview] Message-ID: <bug-113204-4-GhymYXMjZW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113204-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113204 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The comparison function in question: ``` static int cmp_symbol_files (const void *pn1, const void *pn2, void *id_map_) { const symtab_node *n1 = *(const symtab_node * const *)pn1; const symtab_node *n2 = *(const symtab_node * const *)pn2; hash_map<lto_file_decl_data *, int> *id_map = (hash_map<lto_file_decl_data *, int> *)id_map_; int file_order1 = n1->lto_file_data ? n1->lto_file_data->order : -1; int file_order2 = n2->lto_file_data ? n2->lto_file_data->order : -1; /* Order files same way as they appeared in the command line to reduce seeking while copying sections. */ if (file_order1 != file_order2) return file_order1 - file_order2; /* Order within static library. */ if (n1->lto_file_data && n1->lto_file_data->id != n2->lto_file_data->id) return *id_map->get (n1->lto_file_data) - *id_map->get (n2->lto_file_data); /* And finaly order by the definition order. */ return n1->order - n2->order; } ``` I wonder if the map changes ...
next prev parent reply other threads:[~2024-01-02 18:51 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-02 18:44 [Bug lto/113204] New: " doko at gcc dot gnu.org 2024-01-02 18:51 ` pinskia at gcc dot gnu.org [this message] 2024-01-06 6:15 ` [Bug lto/113204] " pinskia at gcc dot gnu.org 2024-01-06 9:35 ` sjames at gcc dot gnu.org 2024-01-06 9:35 ` sjames at gcc dot gnu.org 2024-01-06 9:47 ` [Bug lto/113204] " pinskia at gcc dot gnu.org 2024-01-08 14:40 ` rguenth at gcc dot gnu.org 2024-02-02 7:27 ` xry111 at gcc dot gnu.org 2024-03-16 4:34 ` sjames at gcc dot gnu.org 2024-03-16 4:37 ` sjames at gcc dot gnu.org 2024-03-16 4:39 ` sjames at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113204-4-GhymYXMjZW@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).