Skip to content

[ICE/unrelated compiler error] Incorrect stream direction causes errors #10

@IgWod

Description

@IgWod

When, mistakenly, the write (<<) operator is used with the input clause it cause an unrelated compiler error or ICE.

Example program:

#pragma omp task input(scenter_ref[id] << center_out[block_size])
{
  // ...
}

Possible compiler errors:

during GIMPLE pass: omplower                                                        
stream_simple.c:70:9: internal compiler error: in fold_convert_loc, at fold-const.c:2430                                                      
   70 | #pragma omp task input(scenter_ref[id] << center_out[block_size])                                                                    
      |         ^~~                                                                                                                                                                                              
0x7e8ef7 fold_convert_loc(unsigned int, tree_node*, tree_node*)                
        ../../gcc/fold-const.c:2429                                               
0x984e70 lower_send_clauses                                                                                         
        ../../gcc/omp-low.c:6978                               
0x984e70 lower_omp_taskreg                          
        ../../gcc/omp-low.c:10092                                  
0x976306 lower_omp_1                                                                                                
        ../../gcc/omp-low.c:11511                                                                                                                                                                                                             
0x976306 lower_omp                                                                                                                                                                                                                            
        ../../gcc/omp-low.c:11601                                                                                                                                                                                                             
0x975f1d lower_omp_1                                                                                                                                                                                                                          
        ../../gcc/omp-low.c:11445                                     
0x975f1d lower_omp                      
        ../../gcc/omp-low.c:11601                                                             
0x9766b0 lower_omp_1                                                                                                                        
        ../../gcc/omp-low.c:11437                                           
0x9766b0 lower_omp                                                              
        ../../gcc/omp-low.c:11601                                                                                                             
0x975f1d lower_omp_1                                                                                                                         
        ../../gcc/omp-low.c:11445                                                 
0x975f1d lower_omp                                                 
        ../../gcc/omp-low.c:11601                                                                                                             
0x975f1d lower_omp_1                                                                                                                                                                                                                          
        ../../gcc/omp-low.c:11445                                                                                                                                                                                                             
0x975f1d lower_omp                                                                                                                                                                                                                            
        ../../gcc/omp-low.c:11601                                                                                                                                                                                                             
0x9766b0 lower_omp_1                                                                                                                                                                                                                          
        ../../gcc/omp-low.c:11437                                                                                                                                                                                                             
0x9766b0 lower_omp                                                                                                                                                                                                                            
        ../../gcc/omp-low.c:11601                                                   
0x975f1d lower_omp_1                                      
        ../../gcc/omp-low.c:11445                                                             
0x975f1d lower_omp                                                                  
        ../../gcc/omp-low.c:11601                 
0x9766b0 lower_omp_1                                                              
        ../../gcc/omp-low.c:11437                                       
0x9766b0 lower_omp                                                                                                                          
        ../../gcc/omp-low.c:11601                                                 
0x9766b0 lower_omp_1                                                                          
        ../../gcc/omp-low.c:11437

or

stream_simple.c:75:9: error: Sharing clauses that require building a marshalling function are not allowed at this time. (passing ‘right_in’ to task not allowed, try using a pointer to shared data if possible).
   75 | #pragma omp task input(sleft_ref[id] >> left_in[1],                   \
      |         ^~~
Makefile:7: recipe for target 'stream_simple' failed

The latter happens when there is more than one stream in the clause.

The code is clearly incorrect, but this should result in a related compiler error (and not ICE).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerCompiler related issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions