summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-3023.c
blob: f50fd588115df4002f361ba1f981086f095f9110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
   bug-3023.c. SDCC failed to compile an attempt to write to a string literal.
 */
 
#include <testfwk.h>

#pragma disable_warning 293

void f(void)
{
  *(char *)"c" = 0; // Undefined behaviour if this ever gets executed. Should still compile, though.
}

void
testBug (void)
{
}