public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2302] uninit testcase for PR65244 Date: Wed, 31 Aug 2022 09:07:54 +0000 (GMT) [thread overview] Message-ID: <20220831090754.685CF3839DCD@sourceware.org> (raw) https://gcc.gnu.org/g:beec815f26bcb7041a824e0f7180855d364e2271 commit r13-2302-gbeec815f26bcb7041a824e0f7180855d364e2271 Author: Richard Biener <rguenther@suse.de> Date: Wed Aug 31 11:05:33 2022 +0200 uninit testcase for PR65244 The PR65244 has an issue with code in init_from_control_deps for which there's no direct testcase. The following adds one. PR tree-optimization/65244 * gcc.dg/uninit-pr65244-1.c: New testcase. Diff: --- gcc/testsuite/gcc.dg/uninit-pr65244-1.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gcc/testsuite/gcc.dg/uninit-pr65244-1.c b/gcc/testsuite/gcc.dg/uninit-pr65244-1.c new file mode 100644 index 00000000000..7c1d910d546 --- /dev/null +++ b/gcc/testsuite/gcc.dg/uninit-pr65244-1.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O -Wuninitialized" } */ + +extern void __attribute__((noreturn)) abort (void); + +int foo (int flag, int val) +{ + int tem; + if (flag) + { + if (val == 0) + abort (); + tem = val; + } + /* large - prevent jump threading */ + __asm__ volatile ("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); + if (flag) + return tem; /* { dg-bogus "uninitialized" } */ + return 0; +}
reply other threads:[~2022-08-31 9:07 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220831090754.685CF3839DCD@sourceware.org \ --to=rguenth@gcc.gnu.org \ --cc=gcc-cvs@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).