[Top][All Lists]

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

Re: ERROR assign: messages

From: Jan Nieuwenhuizen
Subject: Re: ERROR assign: messages
Date: Sun, 18 Apr 2021 17:10:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

W. J. van der Laan writes:


> I'm getting error output during mescc compilation about (ostensibly)
> variable size conflicts. Am I doing something wrong or is this
> expected output? For example--
>   CC         ../lib/stdio/vsscanf.c
> ERROR assign: (assn-expr (de-ref (p-expr (ident "d"))) (op "=")
> (fctn-call (p-expr (ident "abtol")) (expr-list (cast (type-name
> (decl-spec-list (type-spec (fixed-type "char"))) (abs-declr (pointer
> (pointer)))) (ref-to (p-expr (ident "p")))) (p-expr (fixed "10")))))  
> size[0]:4 != size[0]:8
> ERROR assign: (assn-expr (de-ref (p-expr (ident "f"))) (op "=") (fctn-call 
> (p-expr (ident "strtod")) (expr-list (p-expr (ident "p")) (ref-to (p-expr 
> (ident "p"))))))   size[0]:4 != size[0]:8
> ERROR assign: (assn-expr (de-ref (p-expr (ident "d"))) (op "=") (fctn-call 
> (p-expr (ident "abtol")) (expr-list (cast (type-name (decl-spec-list 
> (type-spec (fixed-type "char"))) (abs-declr (pointer (pointer)))) (re
> f-to (p-expr (ident "p")))) (p-expr (fixed "10")))))   size[0]:4 != size[0]:8
> ERROR assign: (assn-expr (de-ref (p-expr (ident "f"))) (op "=") (fctn-call 
> (p-expr (ident "strtod")) (expr-list (p-expr (ident "p")) (ref-to (p-expr 
> (ident "p"))))))   size[0]:4 != size[0]:8

Sadly, this is to be expected at the moment.  What happens here is that
the size as calculated for the target of the assignment is smaller than
the size of the rvalue.

> The reason I am asking is because compilation does continue, it does
> not appear to be fatal. Still, I am worried about miscompilation.

Yes.  This is in the area where I tried to warn about: 64bit is not yet
supported: these are problems that we should isolate a failing test case
from and fix.

Either the warning is off, or the size calculation is wrong; mescc's
integer promotion rules are incomplete, I fear.


Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

reply via email to

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