A semiconductor device, comprising: a semiconductor substrate; a temperature sensing unit provided on a front surface of the semiconductor substrate; an anode pad and a cathode pad electrically connected to the temperature sensing unit; a front surface electrode being set to a predetermined reference potential, wherein the front surface electrode includes, a main metal portion provided on the front surface, and a connector for connecting the main metal portion and the bidirectional diode unit; a transistor section electrically connected to the front surface electrode; and a gate runner being provided on a front surface of the semiconductor substrate and electrically connected to a gate electrode of the transistor section, wherein the connector crosses over the gate runner a bidirectional diode unit electrically connected in a serial way between the cathode pad and the front surface electrode; and an output comparison diode unit electrically connected to the temperature sensing unit, wherein the bidirectional diode unit comprises a first diode portion and a second diode portion, wherein an anode of the first diode portion is connected electrically to an anode of the second diode portion, or a cathode of the first diode portion is electrically connected to a cathode of the second diode portion, the output comparison diode unit is arranged in a region between the anode pad and the cathode pad, and the temperature sensing unit includes a temperature sensing diode, and the output comparison diode unit includes an output protective diode connected in parallel to the temperature sensing diode, wherein a polarity of the temperature sensing diode is opposite to a polarity of the output protective diode. a semiconductor substrate; a temperature sensing unit provided on a front surface of the semiconductor substrate; an anode pad and a cathode pad electrically connected to the temperature sensing unit; a front surface electrode being set to a predetermined reference potential, wherein the front surface electrode includes, a main metal portion provided on the front surface, and a connector for connecting the main metal portion and the bidirectional diode unit; a main metal portion provided on the front surface, and a connector for connecting the main metal portion and the bidirectional diode unit; a transistor section electrically connected to the front surface electrode; and a gate runner being provided on a front surface of the semiconductor substrate and electrically connected to a gate electrode of the transistor section, wherein the connector crosses over the gate runner a bidirectional diode unit electrically connected in a serial way between the cathode pad and the front surface electrode; and an output comparison diode unit electrically connected to the temperature sensing unit, wherein the bidirectional diode unit comprises a first diode portion and a second diode portion, wherein an anode of the first diode portion is connected electrically to an anode of the second diode portion, or a cathode of the first diode portion is electrically connected to a cathode of the second diode portion, the output comparison diode unit is arranged in a region between the anode pad and the cathode pad, and the temperature sensing unit includes a temperature sensing diode, and the output comparison diode unit includes an output protective diode connected in parallel to the temperature sensing diode, wherein a polarity of the temperature sensing diode is opposite to a polarity of the output protective diode. the bidirectional diode unit comprises a first diode portion and a second diode portion, wherein an anode of the first diode portion is connected electrically to an anode of the second diode portion, or a cathode of the first diode portion is electrically connected to a cathode of the second diode portion, the output comparison diode unit is arranged in a region between the anode pad and the cathode pad, and the temperature sensing unit includes a temperature sensing diode, and the output comparison diode unit includes an output protective diode connected in parallel to the temperature sensing diode, wherein a polarity of the temperature sensing diode is opposite to a polarity of the output protective diode.