[llvm-bugs] [Bug 47309] New: CASE conflicts with previous cases

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 25 14:37:06 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47309

            Bug ID: 47309
           Summary: CASE conflicts with previous cases
           Product: flang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedbugs at nondot.org
          Reporter: riccardo.bertossa at gmail.com
                CC: David.Truby at arm.com, jperier at nvidia.com,
                    kirankumartp at gmail.com, llvm-bugs at lists.llvm.org,
                    sscalpone at nvidia.com

Created attachment 23894
  --> https://bugs.llvm.org/attachment.cgi?id=23894&action=edit
source code that triggers the problem

this gives an error

$cat select_case.f90
program pippo                           
implicit none                           

integer :: test                         

read (*,*) test                         
select case(test)                       
    case(0:)                            
      write (*,*) 'Not negative number' 
    case(:-1)                           
      write(*,*) 'Negative number'      
end select                              


end program                             

$flang select_case.f90
select_case.f90:10:5: error: CASE (:-1_16) conflicts with previous cases 
      case(:-1)                                                          
      ^^^^^^^^^                                                          
select_case.f90:8:5: Conflicting CASE (0_16:)                            
      case(0:)                                                           
      ^^^^^^^^                                                           
/scratch/llvm/bin/f18: semantic errors in select_case.f90

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200825/c075b9ea/attachment-0001.html>


More information about the llvm-bugs mailing list