public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99621] [8/9/10/11 Regression] Wrong code with -m32 -O1 -fcaller-saves -fexpensive-optimizations since g:058e97ecf33ad0dfd926b3876a4bcf59ac9556ff Date: Wed, 17 Mar 2021 07:32:19 +0000 [thread overview] Message-ID: <bug-99621-4-f9tVOBppkq@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99621-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99621 Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[8/9/10/11 REGRESSION] |[8/9/10/11 Regression] |[bisected to |Wrong code with -m32 -O1 |058e97ecf33ad0dfd926b3876a4 |-fcaller-saves |bcf59ac9556ff] regression |-fexpensive-optimizations |with -m32 -O1 |since |-fcaller-saves |g:058e97ecf33ad0dfd926b3876 |-fexpensive-optimizations |a4bcf59ac9556ff CC| |vmakarov at gcc dot gnu.org --- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> --- I just removed all the warnings that were reported: #include <stdio.h> int a = 12243, g, ad, o, p; enum { b = 8 }; typedef struct { int data_len; } d; double e; struct j ak; struct j am_sj; d main_breaks_blob; double q(char *aa, int *ab, int c) { double n; int i = *ab; g = 1; if (aa[i] == '-') { g = -1; i++; } n = 0; while (aa[i] >= '0') { n = n * 10 + aa[i] - '0'; i++; } if (aa[i] == '.') i++; e = 1.0; while (aa[i] >= '0') { e *= 10; n += (aa[i] - '0') / e; i++; } n *= g; *ab = i; return n; } struct j { FILE *k; } l(d *m, int r) { int ae = 1; ad = r; while (ad >= 10) { ae++; ad /= 10; } m->data_len += ae; m->data_len++; } void af(char *aa, int ag, int ah, double *ai, int aj) { for (; p < ah; p++) { double n = 0; o++; while (aa[o] >= '0') { n = n * 10 + aa[o] - '0'; o++; } ai[p] = n; } } void am(char *an, d *m) { int ao, ap, aq, ac, ag, ab, aw; double ar, as, at, au, av; char aa[8192]; struct j *ay, *f = &am_sj; FILE *az; char *ba = an; f->k = fopen(ba, "r"); ak = *f; ay = &ak; az = ay->k; m->data_len = b + 1; while (aw != EOF) { ag = 0; while (aw != '\r' && ag < 92) { aa[ag++] = aw; aw = getc(az); } while (aw == '\n' || aw == '\r') aw = getc(az); if (__builtin_strncmp(aa, "%%HiResBoundingBox", 9) == 0) { int i; double ai[4]; i = 19; af(&aa[i], i, 4, ai, 0); ar = ai[3]; } ab = 0; int bb; double bc, bd; bb = 0; if (aa[ab] == 'g') bb = ab = 2; bc = q(aa, &ab, ac); ab++; bd = q(aa, &ab, ac); ab++; if (bb) au += bc; if (!as && __builtin_memcmp(&aa[ab], "1 dup neg S t", 3) == 0) { as = au = bc; av = bd; } if (aa[ab] == 'm' && aw == '<') { bc += au; bd += av + ar; if (bd > at || bc > a * 72 / 7227) { double be; int bf = bd < at; be = bd; if (bd - at < 2) be += 8; if (bf) aq += ap; at = bd; ap = be; ao = (aq + be) * 7227 / 72; l(m, ao); } } } } int main() { am("4329652-1.eps", &main_breaks_blob); printf("%d %s\n", main_breaks_blob, main_breaks_blob.data_len == 5167 ? "bug" : "ok"); } Leaving that to Vlad.
next prev parent reply other threads:[~2021-03-17 7:32 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-17 0:11 [Bug c/99621] New: [5-11 REGRESSION] [bisected to 058e97ecf33ad0dfd926b3876a4bcf59ac9556ff] regression with -m32 -O1 -fcaller-saves -fexpensive-optimizations williambader at hotmail dot com 2021-03-17 0:14 ` [Bug rtl-optimization/99621] " williambader at hotmail dot com 2021-03-17 0:20 ` [Bug target/99621] [8,9,10,11 " pinskia at gcc dot gnu.org 2021-03-17 7:22 ` [Bug target/99621] [8/9/10/11 " marxin at gcc dot gnu.org 2021-03-17 7:32 ` marxin at gcc dot gnu.org [this message] 2021-03-17 8:12 ` [Bug target/99621] [8/9/10/11 Regression] Wrong code with -m32 -O1 -fcaller-saves -fexpensive-optimizations since g:058e97ecf33ad0dfd926b3876a4bcf59ac9556ff jakub at gcc dot gnu.org 2021-03-17 8:14 ` williambader at hotmail dot com 2021-03-17 8:27 ` jakub at gcc dot gnu.org 2021-03-17 8:32 ` williambader at hotmail dot com 2021-03-17 8:44 ` williambader at hotmail dot com 2021-03-17 8:56 ` marxin at gcc dot gnu.org 2021-03-17 9:03 ` williambader at hotmail dot com 2021-03-17 9:06 ` marxin at gcc dot gnu.org 2021-03-17 9:19 ` williambader at hotmail dot com 2021-03-17 9:23 ` marxin at gcc dot gnu.org 2021-03-17 9:35 ` williambader at hotmail dot com 2021-03-17 9:37 ` marxin at gcc dot gnu.org 2021-03-17 9:41 ` williambader at hotmail dot com 2021-03-17 9:44 ` marxin at gcc dot gnu.org 2021-03-17 9:58 ` williambader at hotmail dot com 2021-03-17 10:02 ` marxin at gcc dot gnu.org 2021-03-17 10:06 ` jakub at gcc dot gnu.org 2021-03-17 10:08 ` marxin at gcc dot gnu.org 2021-03-17 10:11 ` marxin at gcc dot gnu.org 2021-03-17 10:12 ` jakub at gcc dot gnu.org 2021-03-17 10:23 ` williambader at hotmail dot com
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-99621-4-f9tVOBppkq@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).