A semiconductor device, comprising: a substrate that includes an integrated circuit region; a first interlayer insulation film formed above the substrate; a second interlayer insulation film, which is formed above the first interlayer insulation film; a continuous main-wall part that is formed in the first interlayer insulation film and in the second interlayer insulation film, the main-wall part surrounding the integrated circuit region in a plan view and including a first bend section in a corner region of the substrate in a plan view; a first sub-wall part (3b, 3g1, 3j, 3k1, 3m, 3n), which is located between the integrated circuit region and the first bend section in a plan view, the first sub-wall part being formed in the first interlayer insulation film and in the second interlayer insulation film; a contact hole formed in the first interlayer insulation film of the integrated circuit region; a first trench formed in the first interlayer insulation film; a second trench formed in the first interlayer insulation film, the second trench being connected to the first trench at two positions in the corner region of the substrate in a plan view; a third trench, which is formed in the second interlayer insulation film and is connected to the first trench, the third trench being wider than the first trench in a plan view; a fourth trench, which is formed in the second interlayer insulation film and is wider than the second trench in a plan view, the fourth trench being connected to the third trench at the two positions in the corner region of the substrate in a plan view and to the second trench; a fifth trench, which is formed in the second interlayer insulation film of the integrated circuit region; and a first metal film, which is formed in the contact hole, the first trench, the second trench, the third trench, the fourth trench and the fifth trench, wherein: the third trench is located directly above the first trench; the fourth trench is located directly above the second trench; the main-wall part includes the first trench and the third trench; and the first sub-wall part (3b, 3g1, 3j, 3k1, 3m, 3n) includes the second trench and the fourth trench. a substrate that includes an integrated circuit region; a first interlayer insulation film formed above the substrate; a second interlayer insulation film, which is formed above the first interlayer insulation film; a continuous main-wall part that is formed in the first interlayer insulation film and in the second interlayer insulation film, the main-wall part surrounding the integrated circuit region in a plan view and including a first bend section in a corner region of the substrate in a plan view; a first sub-wall part (3b, 3g1, 3j, 3k1, 3m, 3n), which is located between the integrated circuit region and the first bend section in a plan view, the first sub-wall part being formed in the first interlayer insulation film and in the second interlayer insulation film; a contact hole formed in the first interlayer insulation film of the integrated circuit region; a first trench formed in the first interlayer insulation film; a second trench formed in the first interlayer insulation film, the second trench being connected to the first trench at two positions in the corner region of the substrate in a plan view; a third trench, which is formed in the second interlayer insulation film and is connected to the first trench, the third trench being wider than the first trench in a plan view; a fourth trench, which is formed in the second interlayer insulation film and is wider than the second trench in a plan view, the fourth trench being connected to the third trench at the two positions in the corner region of the substrate in a plan view and to the second trench; a fifth trench, which is formed in the second interlayer insulation film of the integrated circuit region; and a first metal film, which is formed in the contact hole, the first trench, the second trench, the third trench, the fourth trench and the fifth trench, the third trench is located directly above the first trench; the fourth trench is located directly above the second trench; the main-wall part includes the first trench and the third trench; and the first sub-wall part (3b, 3g1, 3j, 3k1, 3m, 3n) includes the second trench and the fourth trench.