diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 456c619..37cb104c 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -1289,6 +1289,28 @@ c_fully_fold_internal (tree expr, bool in_init, bool *maybe_const_operands,
       ret = fold (ret);
       goto out;
 
+    case ATSIGN_EXPR:
+      orig_op0 = op0 = TREE_OPERAND (expr, 0);
+      orig_op1 = op1 = TREE_OPERAND (expr, 1);
+      op0 = c_fully_fold_internal (op0, in_init, maybe_const_operands,
+				   maybe_const_itself);
+      STRIP_TYPE_NOPS (op0);
+      op1 = c_fully_fold_internal (op1, in_init, maybe_const_operands,
+				   maybe_const_itself);
+      STRIP_TYPE_NOPS (op1);
+      op1 = decl_constant_value_for_optimization (op1);
+      ret = copy_node (op0);
+      TREE_TYPE (ret) = build_array_type_nelts (TREE_TYPE (op0),
+						tree_to_uhwi (op1));
+      if (ret != expr)
+	{
+	  TREE_READONLY (ret) = TREE_READONLY (expr);
+	  TREE_SIDE_EFFECTS (ret) = TREE_SIDE_EFFECTS (expr);
+	  TREE_THIS_VOLATILE (ret) = TREE_THIS_VOLATILE (expr);
+	}
+      ret = fold (ret);
+      goto out;
+
     case COMPOUND_EXPR:
     case MODIFY_EXPR:
     case PREDECREMENT_EXPR:
@@ -4084,6 +4106,8 @@ binary_op_error (location_t location, enum tree_code code,
       opname = "||"; break;
     case BIT_XOR_EXPR:
       opname = "^"; break;
+    case ATSIGN_EXPR:
+      opname = "@"; break;
     default:
       gcc_unreachable ();
     }
diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c
index bb55be8..3a9f968 100644
--- a/gcc/c-family/c-lex.c
+++ b/gcc/c-family/c-lex.c
@@ -515,7 +515,10 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags,
 	  break;
 	}
 
-      /* FALLTHROUGH */
+      // Create ATSIGN_EXPR for GDB.
+      *value = NULL_TREE;
+      break;
+
     case CPP_HASH:
     case CPP_PASTE:
       {
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 5cc3892..2a30d72 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -1173,6 +1173,7 @@ enum c_parser_prec {
   PREC_EQ,
   PREC_REL,
   PREC_SHIFT,
+  PREC_ATSIGN,
   PREC_ADD,
   PREC_MULT,
   NUM_PRECS
@@ -6283,6 +6284,16 @@ c_parser_binary_expression (c_parser *parser, struct c_expr *after,
 	  oprec = PREC_ADD;
 	  ocode = MINUS_EXPR;
 	  break;
+	case CPP_ATSIGN:
+	  if (!c_binding_oracle)
+	    {
+	      error_at (c_parser_peek_token (parser)->location,
+			"stray %qs in program", "@");
+	      goto out;
+	    }
+	  oprec = PREC_ATSIGN;
+	  ocode = ATSIGN_EXPR;
+	  break;
 	case CPP_LSHIFT:
 	  oprec = PREC_SHIFT;
 	  ocode = LSHIFT_EXPR;
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index ebe4c73..22e7bd8 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -10976,6 +10976,19 @@ build_binary_op (location_t location, enum tree_code code,
 	maybe_warn_bool_compare (location, code, orig_op0, orig_op1);
       break;
 
+    case ATSIGN_EXPR:
+      if (TREE_CODE (orig_op1) == INTEGER_CST)
+	{
+	  result_type = build_array_type_nelts (type0, tree_to_uhwi (orig_op1));
+	  converted = 1;
+	  break;
+	}
+      // Otherwise it would look unclear:
+      // error: invalid operands to binary @ (have â€˜intâ€™ and â€˜intâ€™)
+      error_at (location,
+		"second parameter of operator %<@%> requires constant integer");
+      return error_mark_node;
+
     default:
       gcc_unreachable ();
     }
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index d7c049f..cf00457 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -2037,6 +2037,7 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, int flags,
     case LTGT_EXPR:
     case ORDERED_EXPR:
     case UNORDERED_EXPR:
+    case ATSIGN_EXPR:
       {
 	const char *op = op_symbol (node);
 	op0 = TREE_OPERAND (node, 0);
@@ -3432,6 +3433,9 @@ op_symbol_code (enum tree_code code)
     case MIN_EXPR:
       return "min";
 
+    case ATSIGN_EXPR:
+      return "@";
+
     default:
       return "<<< ??? >>>";
     }
diff --git a/gcc/tree.def b/gcc/tree.def
index b4b4164..250b8d9 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -669,6 +669,9 @@ DEFTREECODE (PLUS_EXPR, "plus_expr", tcc_binary, 2)
 DEFTREECODE (MINUS_EXPR, "minus_expr", tcc_binary, 2)
 DEFTREECODE (MULT_EXPR, "mult_expr", tcc_binary, 2)
 
+/* GDB operator '@' to create array types.  */
+DEFTREECODE (ATSIGN_EXPR, "atsign_expr", tcc_binary, 2)
+
 /* Pointer addition.  The first operand is always a pointer and the
    second operand is an integer of type sizetype.  */
 DEFTREECODE (POINTER_PLUS_EXPR, "pointer_plus_expr", tcc_binary, 2)
