This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256630 - [newcodemodel] AssertionError: must be non negative -2
Summary: [newcodemodel] AssertionError: must be non negative -2
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
: 256540 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-16 15:18 UTC by Vladimir Voskresensky
Modified: 2015-12-21 19:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 221198


Attachments
stacktrace (3.97 KB, text/plain)
2015-11-16 15:18 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2015-11-16 15:18:06 UTC
Build: NetBeans IDE 8.1 (Build 20151116-3d5ad1f845f6)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.66-b17, Java(TM) SE Runtime Environment, 1.8.0_66-b17
OS: SunOS

User Comments:
vv159170: /net/volvo/export/devarea/osprojects/gcc-master/gcc/testsuite/gcc.dg/cpp/arith-1.c




Stacktrace: 
java.lang.AssertionError: must be non negative -2
   at org.llvm.adt.APInt.ashr(APInt.java:2206)
   at org.llvm.adt.APSInt.$in(APSInt.java:292)
   at org.clang.lex.impl.PPExpressionsStatics.EvaluateDirectiveSubExpr(PPExpressionsStatics.java:216)
   at org.clang.lex.impl.PPExpressionsStatics.EvaluateDirectiveSubExpr(PPExpressionsStatics.java:126)
   at org.clang.lex.Preprocessor.EvaluateDirectiveExpression(Preprocessor.java:5784)
   at org.clang.lex.Preprocessor.HandleIfDirective(Preprocessor.java:8633)
Comment 1 Vladimir Voskresensky 2015-11-16 15:18:08 UTC
Created attachment 157364 [details]
stacktrace
Comment 2 Vladimir Voskresensky 2015-11-16 16:45:18 UTC
*** Bug 256540 has been marked as a duplicate of this bug. ***
Comment 3 Vladimir Kvashin 2015-12-10 11:37:09 UTC
Source code is gcc trunk:
https://codeload.github.com/gcc-mirror/gcc/zip/master
Was unconfugured project.
Comment 4 Vladimir Kvashin 2015-12-10 15:26:47 UTC
The localized example is 

#if 5 >> 1 != 2 || 5 >> -2 != 20 || -5 >> 1 != -3
# error		/* { dg-bogus "error" }  */
#endif
Comment 5 Vladimir Kvashin 2015-12-10 15:40:08 UTC
Fix and test in sputnik:
2f2c02743ab3, 466452b178c5, 9defca56a927
On enum:
f4beffd27485
Comment 6 Quality Engineering 2015-12-16 02:31:21 UTC
Integrated into 'main-silver', will be available in build *201512160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3424e9843b1c
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #256630 - [newcodemodel] AssertionError: must be non negative -2)
(transplanted from f4beffd274856854d439855d476f1e12f65b598c)
Comment 7 soldatov 2015-12-21 19:21:52 UTC
Verified in NetBeans 8.1 with latest internal patches