Skip to content

Commit bb08a82

Browse files
committed
Fix function name to printf
Function could not be found and triggered an error message. gcc/testsuite/ChangeLog: * rust/compile/feature_rust_attri0.rs: Add extern function declaration and change name to printf. * rust/compile/nr2/exclude: Remove now passing test from exclusion list. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
1 parent 97daf31 commit bb08a82

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
extern "C" {
2+
fn printf(s: *const i8, ...);
3+
}
4+
15
#[rustc_builtin_macro] //{ dg-error "internal implementation detail. " "" { target *-*-* } }
26
macro_rules! line {
37
() => {{}};
48
}
59

610
fn main() -> i32 {
711
let a = line!();
8-
print(a);
12+
printf("%d\0" as *const str as *const i8, a);
913

1014
0
1115
}

gcc/testsuite/rust/compile/nr2/exclude

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
canonical_paths1.rs
22
cfg1.rs
33
const_generics_3.rs
4-
feature_rust_attri0.rs
54
generics9.rs
65
issue-1901.rs
76
issue-1981.rs

0 commit comments

Comments
 (0)