Ticket #79 (new bug)

Opened 2 years ago

Last modified 2 years ago

variety of computed_signed_nat(-2147483648) .. x takes 64 bits

Reported by: maxr Assigned to: bp
Priority: normal Milestone: 5.0.0
Component: Installers Version: HEAD
Severity: normal Keywords:
Cc: Operating System: Any
Hardware: Any Sub Component: Installers - 80x86

Description

I use vaiety var_limits (-2147483648 .. 2147483647) and it takes 64 bits instead of 32. The trick is limits are expression (of 64 bits variety) not just signed_nat.

Note if I change lower bound to -2147483647, I get 32 bit variety.

Simple tast case attached.

Attachments

var32_test.tnc (1.1 kB) - added by maxr on 09/04/06 13:40:34.
testcase

Change History

09/04/06 13:40:34 changed by maxr

  • attachment var32_test.tnc added.

testcase

09/04/06 13:45:03 changed by maxr

tnc var32_test.tnc var32_test.j
trans var32_test.j var32_test.s

Assembler looks like

 movl $1,%eax
 xorl %edx,%edx

"1" with length of 64 bits

09/04/06 19:31:56 changed by maxr

stefan suggested a workaround - user expression (-2147483647 - 1) instead of literal -2147483648. It works, but installer should be fixed anyway. I can live with it for predefined Ada integer types, but user can define it's own integer types with such bounds and will expect 32 bits for them.