2024-11-21 23:49 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000429mercuryBugpublic2017-01-20 04:24
Reporterwangp 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000429: cse causes switch to be reported as non-switch
DescriptionThe compiler reports for the given test case:

switch_scope.m:016: Error: the goal inside the require_complete_switch [Index]
switch_scope.m:016: scope is not a switch on `Index'.


The problem is more apparent from the HLDS dump. After pass 045-cse the predicate looks like:

switch_scope.clear(I, P0, P) :-
  require_complete_switch [Index] (
    ( % conjunction
      P0 = pair.(V_15 - V_14)
      ,
      ( % cannot_fail switch on `I'
        % I has functor switch_scope.first/0
        ( % conjunction
          V_12 = V_15
          ,
          Y = V_14
          ,
          V_12 = bool.yes
          ,
          V_13 = bool.no
          ,
          P = pair.(V_13 - Y)
        )
      ;
        % I has functor switch_scope.second/0
        ( % conjunction
          V_15 = X
          ,
          V_14 = V_10
          ,
          V_10 = bool.yes
          ,
          V_11 = bool.no
          ,
          P = pair.(X - V_11)
        )
      )
    )
  ).
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000938

zs (developer)

Fix committed 2017 jan 20.
+Notes

-Issue History
Date Modified Username Field Change
2017-01-19 18:47 wangp New Issue
2017-01-19 18:47 wangp File Added: switch_scope.m
2017-01-19 19:01 zs Assigned To => zs
2017-01-19 19:01 zs Status new => assigned
2017-01-20 04:24 zs Status assigned => resolved
2017-01-20 04:24 zs Resolution open => fixed
2017-01-20 04:24 zs Note Added: 0000938
+Issue History