$ gcc -c -gnatn -O2 beta.adb beta.adb: In function `Beta.T': beta.adb:16: error: verify_flow_info: REG_BR_PROB does not match cfg 9667 333 +===========================GNAT BUG DETECTED==============================+ | 3.5.0 20040330 (experimental) (i686-pc-linux-gnu) verify_flow_info failed| | Error detected at beta.adb:16:8 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | | Include the entire contents of this bug box in the report. | | Include the exact gcc or gnatmake command that you entered. | | Also include sources listed below in gnatchop format | | (concatenated together with no headers between files). | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. beta.adb beta.ads alpha.ads alpha.adb beta.adb:10:07: warning: "X" is never assigned a value compilation abandoned --chop here-- package Alpha is type A_B_Type is (A,B); function "not" (AB : A_B_Type) return A_B_Type; pragma Inline ("not"); function A_Or_B (X : Float) return A_B_Type; pragma Inline (A_Or_B); function C return Integer; pragma Inline (C); end Alpha; package body Alpha is function "not" (AB : A_B_Type) return A_B_Type is begin case AB is when B => return A; when A => return B; end case; end "not"; function A_Or_B (X : Float) return A_B_Type is begin if X < 0.0 then return A; elsif X > 0.0 then return B; else return B; end if; end A_Or_B; function C return Integer is begin return 1; end C; end Alpha; package Beta is pragma Elaborate_Body; end Beta; with Alpha; package body Beta is use Alpha; task T; task body T is X : Float; AB : A_B_Type; begin for K in 1 .. C loop AB := not A_Or_B (X); end loop; end T; end Beta; Environment: System: Linux pbaldrick 2.4.21-199-default #1 Fri Mar 12 08:27:41 UTC 2004 i686 i686 i386 GNU/Linux Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc/configure --prefix=/usr/gnat-cvs --enable-threads=gnat --enable-languages=ada,c How-To-Repeat: gcc -c -gnatn -O2 beta.adb
Fix: Compile without inlining.
Well for this to be checked, we have to depend on Ada actually building.
Duncan, can you please double-check if this bug is still actual?
This bug is no longer present: $ gcc -v Reading specs from /usr/gnat-ssa/lib/gcc/i686-pc-linux-gnu/4.0.0/specs Configured with: ../gcc/configure --prefix=/usr/gnat-ssa --enable-languages=ada,c Thread model: posix gcc version 4.0.0 20041005 (experimental) $ gcc -c -gnatn -O2 beta.adb beta.adb:10:07: warning: "X" is never assigned a value