tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Tinycc fails to assign in global scope


From: Thomas Preud'homme
Subject: [Tinycc-devel] Tinycc fails to assign in global scope
Date: Sat, 6 Aug 2011 00:57:12 +0200
User-agent: KMail/1.13.7 (Linux/3.0.0-1-amd64; KDE/4.6.5; x86_64; ; )

Greetings everyone,

while trying to compile mksh I encountered the following bug:

% cat global_affect.c 
static int foo;
int *var = &foo;

int main(void)
{
        foo = 0;
        return *var;
}

% tcc -o global_affect global_affect.c 

% ./global_affect 
zsh: segmentation fault  ./global_affect

I might be completely wrong but I have the impression that the problem is that 
when a symbol value is made pointer, its constant value is not set to its 
address. As init_putv assume the symbol value pointed at by vtop has a correct 
constant, it fails.

Best regards,

Thomas Preud'homme

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]