aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-08-08 09:28:26 +0000
committerGitHub <noreply@github.com>2022-08-08 09:28:26 +0000
commit8749b66879f3ef78182d7712e5da981cc55f747a (patch)
tree52e0c304bdbc781818a220f3bc05c813bfb1941e /gcc
parentc8f65b3fc8c42f4a11cf4fe5cd57768a33772e02 (diff)
parent23702abda4ec44466f65581391ba9c0eae3f13f6 (diff)
downloadgcc-8749b66879f3ef78182d7712e5da981cc55f747a.zip
gcc-8749b66879f3ef78182d7712e5da981cc55f747a.tar.gz
gcc-8749b66879f3ef78182d7712e5da981cc55f747a.tar.bz2
Merge #1438
1438: Enhance #1426 "Invalid recursive :stmt expansion in fragment specifiers" test case r=philberty a=tschwinge ... that was recently added in #1429 commit 9fc6a27b5c6ea2c775646c4474b9084da76b1764 "expand: correctly handles non-macro nodes ...". - Rename 'macro-issue1403.rs' -> 'macro-issue1426.rs'. - Get rid of '-w'; expect diagnostic instead. - Get rid of debugging options not relevant here. - Get rid of explicit '-O1'; make it a "torture" test case. - Replace always-matching 'scan-assembler "14"' ("14" appears in the crate name) with directed dump scanning. - ..., just not for '-O0', where such optimization is not done. Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/rust/compile/torture/macro-issue1426.rs (renamed from gcc/testsuite/rust/compile/macro-issue1403.rs)7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/testsuite/rust/compile/macro-issue1403.rs b/gcc/testsuite/rust/compile/torture/macro-issue1426.rs
index 756d374..1b558cf 100644
--- a/gcc/testsuite/rust/compile/macro-issue1403.rs
+++ b/gcc/testsuite/rust/compile/torture/macro-issue1426.rs
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-O1 -gdwarf-5 -dA -w" }
+// { dg-additional-options -fdump-tree-ccp1-raw }
+
macro_rules! stmt {
($s:stmt) => {
$s
@@ -13,6 +13,7 @@ macro_rules! stmt {
pub fn test() -> i32 {
stmt!(
let a = 1
+ // { dg-warning {unused name 'a'} {} { target *-*-* } .-1 }
);
stmt!(
let b = 2,
@@ -21,8 +22,8 @@ pub fn test() -> i32 {
let e = 5,
let f = b + c + d + e
);
- // { dg-final { scan-assembler "14" } }
f
+ // { dg-final { scan-tree-dump-times {gimple_return <14>} 1 ccp1 { target __OPTIMIZE__ } } }
}
fn main() {