Frama-C Bug Tracking System - Frama-C
View Issue Details
0000775Frama-CKernelpublic2011-03-31 15:462014-02-12 16:59
Reporterpascal 
Assigned Tomonate 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionFrama-C Carbon-20110201 
Target VersionFixed in VersionFrama-C Nitrogen-20111001 
Summary0000775: Hex/octal signed constants can be represented in an unsigned extended integer type (csmith)
Descriptionmain(){
  int r = 0xE2DB80EBBD4856CDLL >= 1;
  return r;
}

This program, when compiled with GCC, returns 1. This is in accordance to page 56 of the C99 standard, where octal/hexadecimal LL constants can be represented as unsigned long long int when they do not fit inside a long long int.

However the front-end types the program wrongly, leading the value analysis to believe the return value is 0:

~/ppc/bin/toplevel.opt -val u.c -print

[value] Values for function main:
          r ? {0; }
/* Generated by Frama-C */
int main(void)
{
  int r ;
  r = 0xE2DB80EBBD4856CDLL >= (long long )1;
  return (r);
}
TagsNo tags attached.
related to 0000762closed virgile unsigned constants truncated (csmith) 
Attached Files

Notes
(0004816)
monate   
2014-02-12 16:59   
Fix committed to stable/neon branch.

Issue History
2011-03-31 15:46pascalNew Issue
2011-03-31 15:46pascalStatusnew => assigned
2011-03-31 15:46pascalAssigned To => monate
2011-03-31 15:47pascalRelationship addedrelated to 0000762
2011-04-01 12:42monateStatusassigned => acknowledged
2011-04-01 15:39svn
2011-04-01 15:39svnStatusacknowledged => resolved
2011-04-01 15:39svnResolutionopen => fixed
2011-10-10 14:13signolesFixed in Version => Frama-C Nitrogen-20111001
2011-10-10 14:14signolesStatusresolved => closed
2013-12-19 01:12svnSource_changeset_attached => framac master 4bfb0b63
2014-02-12 16:54monateSource_changeset_attached => framac stable/neon 4bfb0b63
2014-02-12 16:59monateNote Added: 0004816
2014-02-12 16:59monateStatusclosed => resolved