xref: /aosp_15_r20/external/ltp/lib/newlib_tests/test11.c (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2016 Linux Test Project
4  */
5 
6 /*
7  * Test for segfault.
8  */
9 
10 #include "tst_test.h"
11 
do_test(void)12 static void do_test(void)
13 {
14 	volatile char *ptr = NULL;
15 
16 	*ptr = 0;
17 
18 	tst_res(TPASS, "Not reached");
19 }
20 
21 static struct tst_test test = {
22 	.test_all = do_test,
23 };
24