authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-06 17:48:38-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-06 17:48:38-07:00
log7dd33d431612cd8511eaea8dcabdca44b354e14b
treed1381cfd8da2bfcacc00cbf84e1570bffda3503e
parent9b9ea405ef1d11af377057067118b07a021b990f

stage2: fix compile errors in test harness


4 files changed, 69 insertions(+), 69 deletions(-)

BRANCH_TODO+4-4
......@@ -1,7 +1,7 @@
1 * namespace decls table can't reference ZIR memory because it can get modified on updates
2 - change it for astgen worker to compare old and new ZIR, updating existing
3 namespaces & decls, and creating a changelist.
4 * reimplement semaDecl
1 * get stage2 tests passing
2 * modify stage2 tests so that only 1 uses _start and the rest use
3 pub fn main
4
55 * use a hash map for instructions because the array is too big
66 - no, actually modify the Zir.Inst.Ref strategy so that each decl gets
77 their indexes starting at 0 so that we can use an array to store Sema
lib/std/elf.zig+7-7
......@@ -4,13 +4,13 @@
44// The MIT license requires this copyright notice to be included in all copies
55// and substantial portions of the software.
66const std = @import("std.zig");
7const builtin = std.builtin;
87const io = std.io;
98const os = std.os;
109const math = std.math;
1110const mem = std.mem;
1211const debug = std.debug;
1312const File = std.fs.File;
13const native_endian = @import("builtin").target.cpu.arch.endian();
1414
1515pub const AT_NULL = 0;
1616pub const AT_IGNORE = 1;
......@@ -336,7 +336,7 @@ pub const ET = enum(u16) {
336336
337337/// All integers are native endian.
338338pub const Header = struct {
339 endian: builtin.Endian,
339 endian: std.builtin.Endian,
340340 machine: EM,
341341 is_64: bool,
342342 entry: u64,
......@@ -380,7 +380,7 @@ pub const Header = struct {
380380 ELFDATA2MSB => .Big,
381381 else => return error.InvalidElfEndian,
382382 };
383 const need_bswap = endian != std.builtin.endian;
383 const need_bswap = endian != native_endian;
384384
385385 const is_64 = switch (hdr32.e_ident[EI_CLASS]) {
386386 ELFCLASS32 => false,
......@@ -426,7 +426,7 @@ pub fn ProgramHeaderIterator(ParseSource: anytype) type {
426426 try self.parse_source.reader().readNoEof(mem.asBytes(&phdr));
427427
428428 // ELF endianness matches native endianness.
429 if (self.elf_header.endian == std.builtin.endian) return phdr;
429 if (self.elf_header.endian == native_endian) return phdr;
430430
431431 // Convert fields to native endianness.
432432 bswapAllFields(Elf64_Phdr, &phdr);
......@@ -439,7 +439,7 @@ pub fn ProgramHeaderIterator(ParseSource: anytype) type {
439439 try self.parse_source.reader().readNoEof(mem.asBytes(&phdr));
440440
441441 // ELF endianness does NOT match native endianness.
442 if (self.elf_header.endian != std.builtin.endian) {
442 if (self.elf_header.endian != native_endian) {
443443 // Convert fields to native endianness.
444444 bswapAllFields(Elf32_Phdr, &phdr);
445445 }
......@@ -476,7 +476,7 @@ pub fn SectionHeaderIterator(ParseSource: anytype) type {
476476 try self.parse_source.reader().readNoEof(mem.asBytes(&shdr));
477477
478478 // ELF endianness matches native endianness.
479 if (self.elf_header.endian == std.builtin.endian) return shdr;
479 if (self.elf_header.endian == native_endian) return shdr;
480480
481481 // Convert fields to native endianness.
482482 return Elf64_Shdr{
......@@ -499,7 +499,7 @@ pub fn SectionHeaderIterator(ParseSource: anytype) type {
499499 try self.parse_source.reader().readNoEof(mem.asBytes(&shdr));
500500
501501 // ELF endianness does NOT match native endianness.
502 if (self.elf_header.endian != std.builtin.endian) {
502 if (self.elf_header.endian != native_endian) {
503503 // Convert fields to native endianness.
504504 shdr = .{
505505 .sh_name = @byteSwap(@TypeOf(shdr.sh_name), shdr.sh_name),
src/test.zig+1-1
......@@ -135,7 +135,7 @@ pub const TestContext = struct {
135135 /// to Executable.
136136 output_mode: std.builtin.OutputMode,
137137 updates: std.ArrayList(Update),
138 object_format: ?std.builtin.ObjectFormat = null,
138 object_format: ?std.Target.ObjectFormat = null,
139139 emit_h: bool = false,
140140 llvm_backend: bool = false,
141141
test/stage2/test.zig+57-57
......@@ -66,7 +66,7 @@ pub fn addCases(ctx: *TestContext) !void {
6666 );
6767 // Now change the message only
6868 case.addCompareOutput(
69 \\export fn _start() noreturn {
69 \\pub export fn _start() noreturn {
7070 \\ print();
7171 \\
7272 \\ exit();
......@@ -98,7 +98,7 @@ pub fn addCases(ctx: *TestContext) !void {
9898 );
9999 // Now we print it twice.
100100 case.addCompareOutput(
101 \\export fn _start() noreturn {
101 \\pub export fn _start() noreturn {
102102 \\ print();
103103 \\ print();
104104 \\
......@@ -136,7 +136,7 @@ pub fn addCases(ctx: *TestContext) !void {
136136 {
137137 var case = ctx.exe("adding numbers at comptime", linux_x64);
138138 case.addCompareOutput(
139 \\export fn _start() noreturn {
139 \\pub export fn _start() noreturn {
140140 \\ asm volatile ("syscall"
141141 \\ :
142142 \\ : [number] "{rax}" (1),
......@@ -161,7 +161,7 @@ pub fn addCases(ctx: *TestContext) !void {
161161 {
162162 var case = ctx.exe("adding numbers at runtime and comptime", linux_x64);
163163 case.addCompareOutput(
164 \\export fn _start() noreturn {
164 \\pub export fn _start() noreturn {
165165 \\ add(3, 4);
166166 \\
167167 \\ exit();
......@@ -185,7 +185,7 @@ pub fn addCases(ctx: *TestContext) !void {
185185 );
186186 // comptime function call
187187 case.addCompareOutput(
188 \\export fn _start() noreturn {
188 \\pub export fn _start() noreturn {
189189 \\ exit();
190190 \\}
191191 \\
......@@ -209,7 +209,7 @@ pub fn addCases(ctx: *TestContext) !void {
209209 );
210210 // Inline function call
211211 case.addCompareOutput(
212 \\export fn _start() noreturn {
212 \\pub export fn _start() noreturn {
213213 \\ var x: usize = 3;
214214 \\ const y = add(1, 2, x);
215215 \\ exit(y - 6);
......@@ -236,7 +236,7 @@ pub fn addCases(ctx: *TestContext) !void {
236236 {
237237 var case = ctx.exe("subtracting numbers at runtime", linux_x64);
238238 case.addCompareOutput(
239 \\export fn _start() noreturn {
239 \\pub export fn _start() noreturn {
240240 \\ sub(7, 4);
241241 \\
242242 \\ exit();
......@@ -262,7 +262,7 @@ pub fn addCases(ctx: *TestContext) !void {
262262 {
263263 var case = ctx.exe("@TypeOf", linux_x64);
264264 case.addCompareOutput(
265 \\export fn _start() noreturn {
265 \\pub export fn _start() noreturn {
266266 \\ var x: usize = 0;
267267 \\ const z = @TypeOf(x, @as(u128, 5));
268268 \\ assert(z == u128);
......@@ -287,7 +287,7 @@ pub fn addCases(ctx: *TestContext) !void {
287287 "",
288288 );
289289 case.addCompareOutput(
290 \\export fn _start() noreturn {
290 \\pub export fn _start() noreturn {
291291 \\ const z = @TypeOf(true);
292292 \\ assert(z == bool);
293293 \\
......@@ -311,7 +311,7 @@ pub fn addCases(ctx: *TestContext) !void {
311311 "",
312312 );
313313 case.addError(
314 \\export fn _start() noreturn {
314 \\pub export fn _start() noreturn {
315315 \\ const z = @TypeOf(true, 1);
316316 \\ unreachable;
317317 \\}
......@@ -321,7 +321,7 @@ pub fn addCases(ctx: *TestContext) !void {
321321 {
322322 var case = ctx.exe("assert function", linux_x64);
323323 case.addCompareOutput(
324 \\export fn _start() noreturn {
324 \\pub export fn _start() noreturn {
325325 \\ add(3, 4);
326326 \\
327327 \\ exit();
......@@ -351,7 +351,7 @@ pub fn addCases(ctx: *TestContext) !void {
351351 // Tests copying a register. For the `c = a + b`, it has to
352352 // preserve both a and b, because they are both used later.
353353 case.addCompareOutput(
354 \\export fn _start() noreturn {
354 \\pub export fn _start() noreturn {
355355 \\ add(3, 4);
356356 \\
357357 \\ exit();
......@@ -383,7 +383,7 @@ pub fn addCases(ctx: *TestContext) !void {
383383
384384 // More stress on the liveness detection.
385385 case.addCompareOutput(
386 \\export fn _start() noreturn {
386 \\pub export fn _start() noreturn {
387387 \\ add(3, 4);
388388 \\
389389 \\ exit();
......@@ -419,7 +419,7 @@ pub fn addCases(ctx: *TestContext) !void {
419419
420420 // Requires a second move. The register allocator should figure out to re-use rax.
421421 case.addCompareOutput(
422 \\export fn _start() noreturn {
422 \\pub export fn _start() noreturn {
423423 \\ add(3, 4);
424424 \\
425425 \\ exit();
......@@ -456,7 +456,7 @@ pub fn addCases(ctx: *TestContext) !void {
456456
457457 // Now we test integer return values.
458458 case.addCompareOutput(
459 \\export fn _start() noreturn {
459 \\pub export fn _start() noreturn {
460460 \\ assert(add(3, 4) == 7);
461461 \\ assert(add(20, 10) == 30);
462462 \\
......@@ -486,7 +486,7 @@ pub fn addCases(ctx: *TestContext) !void {
486486
487487 // Local mutable variables.
488488 case.addCompareOutput(
489 \\export fn _start() noreturn {
489 \\pub export fn _start() noreturn {
490490 \\ assert(add(3, 4) == 7);
491491 \\ assert(add(20, 10) == 30);
492492 \\
......@@ -520,7 +520,7 @@ pub fn addCases(ctx: *TestContext) !void {
520520
521521 // Optionals
522522 case.addCompareOutput(
523 \\export fn _start() noreturn {
523 \\pub export fn _start() noreturn {
524524 \\ const a: u32 = 2;
525525 \\ const b: ?u32 = a;
526526 \\ const c = b.?;
......@@ -544,7 +544,7 @@ pub fn addCases(ctx: *TestContext) !void {
544544
545545 // While loops
546546 case.addCompareOutput(
547 \\export fn _start() noreturn {
547 \\pub export fn _start() noreturn {
548548 \\ var i: u32 = 0;
549549 \\ while (i < 4) : (i += 1) print();
550550 \\ assert(i == 4);
......@@ -583,7 +583,7 @@ pub fn addCases(ctx: *TestContext) !void {
583583
584584 // inline while requires the condition to be comptime known.
585585 case.addError(
586 \\export fn _start() noreturn {
586 \\pub export fn _start() noreturn {
587587 \\ var i: u32 = 0;
588588 \\ inline while (i < 4) : (i += 1) print();
589589 \\ assert(i == 4);
......@@ -620,7 +620,7 @@ pub fn addCases(ctx: *TestContext) !void {
620620
621621 // Labeled blocks (no conditional branch)
622622 case.addCompareOutput(
623 \\export fn _start() noreturn {
623 \\pub export fn _start() noreturn {
624624 \\ assert(add(3, 4) == 20);
625625 \\
626626 \\ exit();
......@@ -657,7 +657,7 @@ pub fn addCases(ctx: *TestContext) !void {
657657
658658 // This catches a possible bug in the logic for re-using dying operands.
659659 case.addCompareOutput(
660 \\export fn _start() noreturn {
660 \\pub export fn _start() noreturn {
661661 \\ assert(add(3, 4) == 116);
662662 \\
663663 \\ exit();
......@@ -699,7 +699,7 @@ pub fn addCases(ctx: *TestContext) !void {
699699
700700 // Spilling registers to the stack.
701701 case.addCompareOutput(
702 \\export fn _start() noreturn {
702 \\pub export fn _start() noreturn {
703703 \\ assert(add(3, 4) == 791);
704704 \\
705705 \\ exit();
......@@ -751,7 +751,7 @@ pub fn addCases(ctx: *TestContext) !void {
751751
752752 // Reusing the registers of dead operands playing nicely with conditional branching.
753753 case.addCompareOutput(
754 \\export fn _start() noreturn {
754 \\pub export fn _start() noreturn {
755755 \\ assert(add(3, 4) == 791);
756756 \\ assert(add(4, 3) == 79);
757757 \\
......@@ -813,7 +813,7 @@ pub fn addCases(ctx: *TestContext) !void {
813813
814814 // Character literals and multiline strings.
815815 case.addCompareOutput(
816 \\export fn _start() noreturn {
816 \\pub export fn _start() noreturn {
817817 \\ const ignore =
818818 \\ \\ cool thx
819819 \\ \\
......@@ -846,7 +846,7 @@ pub fn addCases(ctx: *TestContext) !void {
846846
847847 // Global const.
848848 case.addCompareOutput(
849 \\export fn _start() noreturn {
849 \\pub export fn _start() noreturn {
850850 \\ add(aa, bb);
851851 \\
852852 \\ exit();
......@@ -878,7 +878,7 @@ pub fn addCases(ctx: *TestContext) !void {
878878
879879 // Array access.
880880 case.addCompareOutput(
881 \\export fn _start() noreturn {
881 \\pub export fn _start() noreturn {
882882 \\ assert("hello"[0] == 'h');
883883 \\
884884 \\ exit();
......@@ -904,7 +904,7 @@ pub fn addCases(ctx: *TestContext) !void {
904904 // Array access to a global array.
905905 case.addCompareOutput(
906906 \\const hello = "hello".*;
907 \\export fn _start() noreturn {
907 \\pub export fn _start() noreturn {
908908 \\ assert(hello[1] == 'e');
909909 \\
910910 \\ exit();
......@@ -929,7 +929,7 @@ pub fn addCases(ctx: *TestContext) !void {
929929
930930 // 64bit set stack
931931 case.addCompareOutput(
932 \\export fn _start() noreturn {
932 \\pub export fn _start() noreturn {
933933 \\ var i: u64 = 0xFFEEDDCCBBAA9988;
934934 \\ assert(i == 0xFFEEDDCCBBAA9988);
935935 \\
......@@ -955,7 +955,7 @@ pub fn addCases(ctx: *TestContext) !void {
955955
956956 // Basic for loop
957957 case.addCompareOutput(
958 \\export fn _start() noreturn {
958 \\pub export fn _start() noreturn {
959959 \\ for ("hello") |_| print();
960960 \\
961961 \\ exit();
......@@ -990,7 +990,7 @@ pub fn addCases(ctx: *TestContext) !void {
990990 {
991991 var case = ctx.exe("basic import", linux_x64);
992992 case.addCompareOutput(
993 \\export fn _start() noreturn {
993 \\pub export fn _start() noreturn {
994994 \\ @import("print.zig").print();
995995 \\ exit();
996996 \\}
......@@ -1027,14 +1027,14 @@ pub fn addCases(ctx: *TestContext) !void {
10271027 {
10281028 var case = ctx.exe("redundant comptime", linux_x64);
10291029 case.addError(
1030 \\export fn _start() void {
1030 \\pub export fn _start() void {
10311031 \\ var a: comptime u32 = 0;
10321032 \\}
10331033 ,
10341034 &.{":2:21: error: redundant comptime keyword in already comptime scope"},
10351035 );
10361036 case.addError(
1037 \\export fn _start() void {
1037 \\pub export fn _start() void {
10381038 \\ comptime {
10391039 \\ var a: u32 = comptime 0;
10401040 \\ }
......@@ -1046,7 +1046,7 @@ pub fn addCases(ctx: *TestContext) !void {
10461046 {
10471047 var case = ctx.exe("import private", linux_x64);
10481048 case.addError(
1049 \\export fn _start() noreturn {
1049 \\pub export fn _start() noreturn {
10501050 \\ @import("print.zig").print();
10511051 \\ exit();
10521052 \\}
......@@ -1104,7 +1104,7 @@ pub fn addCases(ctx: *TestContext) !void {
11041104 });
11051105
11061106 ctx.compileError("compileError", linux_x64,
1107 \\export fn _start() noreturn {
1107 \\pub export fn _start() noreturn {
11081108 \\ @compileError("this is an error");
11091109 \\ unreachable;
11101110 \\}
......@@ -1113,7 +1113,7 @@ pub fn addCases(ctx: *TestContext) !void {
11131113 {
11141114 var case = ctx.obj("variable shadowing", linux_x64);
11151115 case.addError(
1116 \\export fn _start() noreturn {
1116 \\pub export fn _start() noreturn {
11171117 \\ var i: u32 = 10;
11181118 \\ var i: u32 = 10;
11191119 \\ unreachable;
......@@ -1124,7 +1124,7 @@ pub fn addCases(ctx: *TestContext) !void {
11241124 });
11251125 case.addError(
11261126 \\var testing: i64 = 10;
1127 \\export fn _start() noreturn {
1127 \\pub export fn _start() noreturn {
11281128 \\ var testing: i64 = 20;
11291129 \\ unreachable;
11301130 \\}
......@@ -1136,7 +1136,7 @@ pub fn addCases(ctx: *TestContext) !void {
11361136 var case = ctx.obj("@compileLog", linux_x64);
11371137 // The other compile error prevents emission of a "found compile log" statement.
11381138 case.addError(
1139 \\export fn _start() noreturn {
1139 \\pub export fn _start() noreturn {
11401140 \\ const b = true;
11411141 \\ var f: u32 = 1;
11421142 \\ @compileLog(b, 20, f, x);
......@@ -1154,7 +1154,7 @@ pub fn addCases(ctx: *TestContext) !void {
11541154
11551155 // Now only compile log statements remain. One per Decl.
11561156 case.addError(
1157 \\export fn _start() noreturn {
1157 \\pub export fn _start() noreturn {
11581158 \\ const b = true;
11591159 \\ var f: u32 = 1;
11601160 \\ @compileLog(b, 20, f, x);
......@@ -1192,7 +1192,7 @@ pub fn addCases(ctx: *TestContext) !void {
11921192
11931193 // Break out of loop
11941194 case.addCompareOutput(
1195 \\export fn _start() noreturn {
1195 \\pub export fn _start() noreturn {
11961196 \\ while (true) {
11971197 \\ break;
11981198 \\ }
......@@ -1213,7 +1213,7 @@ pub fn addCases(ctx: *TestContext) !void {
12131213 "",
12141214 );
12151215 case.addCompareOutput(
1216 \\export fn _start() noreturn {
1216 \\pub export fn _start() noreturn {
12171217 \\ foo: while (true) {
12181218 \\ break :foo;
12191219 \\ }
......@@ -1236,7 +1236,7 @@ pub fn addCases(ctx: *TestContext) !void {
12361236
12371237 // Continue in loop
12381238 case.addCompareOutput(
1239 \\export fn _start() noreturn {
1239 \\pub export fn _start() noreturn {
12401240 \\ var i: u64 = 0;
12411241 \\ while (true) : (i+=1) {
12421242 \\ if (i == 4) exit();
......@@ -1257,7 +1257,7 @@ pub fn addCases(ctx: *TestContext) !void {
12571257 "",
12581258 );
12591259 case.addCompareOutput(
1260 \\export fn _start() noreturn {
1260 \\pub export fn _start() noreturn {
12611261 \\ var i: u64 = 0;
12621262 \\ foo: while (true) : (i+=1) {
12631263 \\ if (i == 4) exit();
......@@ -1318,7 +1318,7 @@ pub fn addCases(ctx: *TestContext) !void {
13181318 {
13191319 var case = ctx.exe("compile error in inline fn call fixed", linux_x64);
13201320 case.addError(
1321 \\export fn _start() noreturn {
1321 \\pub export fn _start() noreturn {
13221322 \\ var x: usize = 3;
13231323 \\ const y = add(10, 2, x);
13241324 \\ exit(y - 6);
......@@ -1341,7 +1341,7 @@ pub fn addCases(ctx: *TestContext) !void {
13411341 , &[_][]const u8{":8:18: error: bad"});
13421342
13431343 case.addCompareOutput(
1344 \\export fn _start() noreturn {
1344 \\pub export fn _start() noreturn {
13451345 \\ var x: usize = 3;
13461346 \\ const y = add(1, 2, x);
13471347 \\ exit(y - 6);
......@@ -1368,7 +1368,7 @@ pub fn addCases(ctx: *TestContext) !void {
13681368 {
13691369 var case = ctx.exe("recursive inline function", linux_x64);
13701370 case.addCompareOutput(
1371 \\export fn _start() noreturn {
1371 \\pub export fn _start() noreturn {
13721372 \\ const y = fibonacci(7);
13731373 \\ exit(y - 21);
13741374 \\}
......@@ -1394,7 +1394,7 @@ pub fn addCases(ctx: *TestContext) !void {
13941394 // Without storing source locations relative to the owner decl, the compile error
13951395 // here would be off by 2 bytes (from the "7" -> "999").
13961396 case.addError(
1397 \\export fn _start() noreturn {
1397 \\pub export fn _start() noreturn {
13981398 \\ const y = fibonacci(999);
13991399 \\ exit(y - 21);
14001400 \\}
......@@ -1418,7 +1418,7 @@ pub fn addCases(ctx: *TestContext) !void {
14181418 {
14191419 var case = ctx.exe("orelse at comptime", linux_x64);
14201420 case.addCompareOutput(
1421 \\export fn _start() noreturn {
1421 \\pub export fn _start() noreturn {
14221422 \\ const i: ?u64 = 0;
14231423 \\ const orelsed = i orelse 5;
14241424 \\ assert(orelsed == 0);
......@@ -1440,7 +1440,7 @@ pub fn addCases(ctx: *TestContext) !void {
14401440 "",
14411441 );
14421442 case.addCompareOutput(
1443 \\export fn _start() noreturn {
1443 \\pub export fn _start() noreturn {
14441444 \\ const i: ?u64 = null;
14451445 \\ const orelsed = i orelse 5;
14461446 \\ assert(orelsed == 5);
......@@ -1466,7 +1466,7 @@ pub fn addCases(ctx: *TestContext) !void {
14661466 {
14671467 var case = ctx.exe("only 1 function and it gets updated", linux_x64);
14681468 case.addCompareOutput(
1469 \\export fn _start() noreturn {
1469 \\pub export fn _start() noreturn {
14701470 \\ asm volatile ("syscall"
14711471 \\ :
14721472 \\ : [number] "{rax}" (60), // exit
......@@ -1479,7 +1479,7 @@ pub fn addCases(ctx: *TestContext) !void {
14791479 "",
14801480 );
14811481 case.addCompareOutput(
1482 \\export fn _start() noreturn {
1482 \\pub export fn _start() noreturn {
14831483 \\ asm volatile ("syscall"
14841484 \\ :
14851485 \\ : [number] "{rax}" (231), // exit_group
......@@ -1495,7 +1495,7 @@ pub fn addCases(ctx: *TestContext) !void {
14951495 {
14961496 var case = ctx.exe("passing u0 to function", linux_x64);
14971497 case.addCompareOutput(
1498 \\export fn _start() noreturn {
1498 \\pub export fn _start() noreturn {
14991499 \\ doNothing(0);
15001500 \\ exit();
15011501 \\}
......@@ -1516,7 +1516,7 @@ pub fn addCases(ctx: *TestContext) !void {
15161516 {
15171517 var case = ctx.exe("catch at comptime", linux_x64);
15181518 case.addCompareOutput(
1519 \\export fn _start() noreturn {
1519 \\pub export fn _start() noreturn {
15201520 \\ const i: anyerror!u64 = 0;
15211521 \\ const caught = i catch 5;
15221522 \\ assert(caught == 0);
......@@ -1539,7 +1539,7 @@ pub fn addCases(ctx: *TestContext) !void {
15391539 );
15401540
15411541 case.addCompareOutput(
1542 \\export fn _start() noreturn {
1542 \\pub export fn _start() noreturn {
15431543 \\ const i: anyerror!u64 = error.B;
15441544 \\ const caught = i catch 5;
15451545 \\ assert(caught == 5);
......@@ -1562,7 +1562,7 @@ pub fn addCases(ctx: *TestContext) !void {
15621562 );
15631563
15641564 case.addCompareOutput(
1565 \\export fn _start() noreturn {
1565 \\pub export fn _start() noreturn {
15661566 \\ const a: anyerror!comptime_int = 42;
15671567 \\ const b: *const comptime_int = &(a catch unreachable);
15681568 \\ assert(b.* == 42);
......@@ -1584,7 +1584,7 @@ pub fn addCases(ctx: *TestContext) !void {
15841584 , "");
15851585
15861586 case.addCompareOutput(
1587 \\export fn _start() noreturn {
1587 \\pub export fn _start() noreturn {
15881588 \\ const a: anyerror!u32 = error.B;
15891589 \\ _ = &(a catch |err| assert(err == error.B));
15901590 \\ exit();
......@@ -1604,7 +1604,7 @@ pub fn addCases(ctx: *TestContext) !void {
16041604 , "");
16051605
16061606 case.addCompareOutput(
1607 \\export fn _start() noreturn {
1607 \\pub export fn _start() noreturn {
16081608 \\ const a: anyerror!u32 = error.Bar;
16091609 \\ a catch |err| assert(err == error.Bar);
16101610 \\
......@@ -1628,7 +1628,7 @@ pub fn addCases(ctx: *TestContext) !void {
16281628 var case = ctx.exe("merge error sets", linux_x64);
16291629
16301630 case.addCompareOutput(
1631 \\export fn _start() noreturn {
1631 \\pub export fn _start() noreturn {
16321632 \\ const E = error{ A, B, D } || error { A, B, C };
16331633 \\ const a = E.A;
16341634 \\ const b = E.B;