@@ -571,7 +571,6 @@ void check_initiation_interval_expression() {
571571 a[i] = 0 ;
572572}
573573
574- // Template instantiation test coverages for Intel FPGA loop attribute max_concurrency.
575574void check_speculated_iterations_expression () {
576575 int a[10 ];
577576 // Test that checks expression is not a constant expression.
@@ -604,38 +603,19 @@ void check_loop_coalesce_expression() {
604603 a[i] = 0 ;
605604}
606605
607- // Template instantiation test coverages for Intel FPGA loop attribute max_concurrency.
608606void check_loop_count_expression () {
609607 int a[10 ];
610608
611609 // Test that checks expression is not a constant expression.
612- int foo; // expected-note 3{{declared here}}
613- // expected-error@+2{{expression is not an integral constant expression}}
614- // expected-note@+1{{read of non-const variable 'foo' is not allowed in a constant expression}}
615- [[intel::loop_count_avg (foo + 1 )]] for (int i = 0 ; i != 10 ; ++i)
616- a[i] = 0 ;
617-
610+ int foo; // expected-note {{declared here}}
618611 // expected-error@+2{{expression is not an integral constant expression}}
619612 // expected-note@+1{{read of non-const variable 'foo' is not allowed in a constant expression}}
620613 [[intel::loop_count_max (foo + 1 )]] for (int i = 0 ; i != 10 ; ++i)
621614 a[i] = 0 ;
622615
623- // expected-error@+2{{expression is not an integral constant expression}}
624- // expected-note@+1{{read of non-const variable 'foo' is not allowed in a constant expression}}
625- [[intel::loop_count_min (foo + 1 )]] for (int i = 0 ; i != 10 ; ++i)
626- a[i] = 0 ;
627-
628616 // Test that checks expression is a constant expression.
629617 constexpr int bar = 0 ;
630- [[intel::loop_count_avg (bar + 2 )]] for (int i = 0 ; i != 10 ; ++i) // OK
631- a[i] = 0 ;
632-
633- constexpr int bar1 = 0 ;
634- [[intel::loop_count_max (bar1 + 2 )]] for (int i = 0 ; i != 10 ; ++i) // OK
635- a[i] = 0 ;
636-
637- constexpr int bar2 = 0 ;
638- [[intel::loop_count_min (bar2 + 2 )]] for (int i = 0 ; i != 10 ; ++i) // OK
618+ [[intel::loop_count_max (bar + 2 )]] for (int i = 0 ; i != 10 ; ++i) // OK
639619 a[i] = 0 ;
640620}
641621
0 commit comments