"enum conversion in assignment is invalid in C++");
}
- /* If the lhs is atomic, remove that qualifier. */
- if (is_atomic_op)
- {
- lhstype = build_qualified_type (lhstype,
- (TYPE_QUALS (lhstype)
- & ~TYPE_QUAL_ATOMIC));
- olhstype = build_qualified_type (olhstype,
- (TYPE_QUALS (lhstype)
- & ~TYPE_QUAL_ATOMIC));
- }
+ /* Remove qualifiers. */
+ lhstype = build_qualified_type (lhstype, TYPE_UNQUALIFIED);
+ olhstype = build_qualified_type (olhstype, TYPE_UNQUALIFIED);
/* Convert new value to destination type. Fold it first, then
restore any excess precision information, for the sake of
--- /dev/null
+/* test that assignment drops qualifiers, Bug 98047 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+
+volatile int jv;
+extern int j;
+extern typeof(jv = 1) j;
+
+_Atomic int ja;
+extern typeof(ja = 1) j;
+
+int * __restrict pa;
+extern int *p;
+extern typeof(pa = 0) p;
+
+
+