Bug 14864 - [4.0? Regression] ICE: verify_flow_info: REG_BR_PROB does not match cfg 9667 333
Summary: [4.0? Regression] ICE: verify_flow_info: REG_BR_PROB does not match cfg 9667 333
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.0.0
: P3 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on: 15416
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-06 12:25 UTC by duncan.sands@free.fr
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description duncan.sands@free.fr 2004-04-06 12:25:34 UTC
$ 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
Comment 1 duncan.sands@free.fr 2004-04-06 12:25:34 UTC
Fix:
Compile without inlining.
Comment 2 Andrew Pinski 2004-07-17 03:58:42 UTC
Well for this to be checked, we have to depend on Ada actually building.
Comment 3 Giovanni Bajo 2004-10-07 09:17:27 UTC
Duncan, can you please double-check if this bug is still actual?
Comment 4 duncan.sands@free.fr 2004-10-07 16:19:35 UTC
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